In the RITM we have variables they are like in sections which are shown in below attachment

mastan babu ko1
Tera Contributor

In the service request we have different variables sections on the RITM form.

So defaultly, Those sections are openly (-) coming in the ritm form i.e., shown as attachement1

Now I need those sections should be collapsed or closed the (+) as like in attachment2

 

Is there any feature in servicenow or any other way to make it possiable? 

 

Need Help Please!

1 ACCEPTED SOLUTION

If the variable set doesn't contain a variable with the type of Container Start, then use the sys_id of the variable set to achieve the same.  Mandatory variables don't affect this toggling as it is not trying to 'hide' the variables, rather it's collapsing a section just like you can do manually, so the variables are still on the form and mandatory.  It's not a great user experience to have mandatory variables in a collapsed section, in my opinion.

View solution in original post

3 REPLIES 3

Brad Bowman
Kilo Patron
Kilo Patron

In the Catalog Item definition, on the Variables Related List you will have some records with the Type = Container Start.  View one of these records for a container that you want to open in the collapsed format.  Right-click in the gray header bar and choose Copy sys_id.  Next create an onLoad Catalog Client Script:

function onLoad() {
	toggleVariableContainer('06c99dbc9769355041e1f757f053afea');
}

replacing the value in quotes with your container start sy_id that you just copied.

Hi, In a variable we not using type container start, Those variable are belonging to single row variable set, those variables set are also containing mandatory variables.

So how can we achive the output as attachment2?

If the variable set doesn't contain a variable with the type of Container Start, then use the sys_id of the variable set to achieve the same.  Mandatory variables don't affect this toggling as it is not trying to 'hide' the variables, rather it's collapsing a section just like you can do manually, so the variables are still on the form and mandatory.  It's not a great user experience to have mandatory variables in a collapsed section, in my opinion.