RITM variables briefly appear and then disappear after page load
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I am facing an issue with a Service Catalog Requested Item (RITM) form where variables briefly appear when the form loads and then disappear automatically after a second. I want variables to appear on RITM form. How do I do that?
I suspect it might be related to my catalog client script . Below is the script being used:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
hideAndResetAll();
if (newValue === "approval_matrix_modification") {
g_form.setDisplay("name_of_approval_matrix", true);
g_form.setMandatory("name_of_approval_matrix", true);
g_form.setDisplay("add", true);
g_form.setDisplay("remove", true);
g_form.setDisplay("details", true);
} else if (newValue === "visibility_modification") {
g_form.setDisplay("name_of_item", true);
g_form.setMandatory("name_of_item", true);
g_form.setDisplay("add_visibility", true);
g_form.setDisplay("remove_visibility", true);
g_form.setDisplay("details_visibility_modification", true);
} else if (newValue === "form_modification") {
g_form.setDisplay("name_of_item_form", true);
g_form.setMandatory("name_of_item_form", true);
g_form.setMandatory("details_form_modification", true);
g_form.setDisplay("details_form_modification", true);
}
function hideAndResetAll() {
g_form.setMandatory("name_of_approval_matrix", false);
g_form.setDisplay("name_of_approval_matrix", false);
g_form.setDisplay("add", false);
g_form.setDisplay("remove", false);
g_form.setDisplay("details", false);
g_form.setMandatory("name_of_item", false);
g_form.setDisplay("name_of_item", false);
g_form.setDisplay("add_visibility", false);
g_form.setDisplay("remove_visibility", false);
g_form.setDisplay("details_visibility_modification", false);
g_form.setMandatory("name_of_item_form", false);
g_form.setDisplay("name_of_item_form", false);
g_form.setMandatory("details_form_modification", false);
g_form.setDisplay("details_form_modification", false);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
your above script is not causing this
Some other catalog client script which applies on Requested Item or Catalog UI policy is hiding that
All variables are hidden or some?
is it visible for admin?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader