- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 04:03 AM
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!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 08:21 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 05:25 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 07:01 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 08:21 AM
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.