RITM variables briefly appear and then disappear after page load

muskaanchan
Giga Contributor

 

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);
}
}
 

 

0 REPLIES 0