- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2014 08:37 AM
I was reviewing useful scripts on the wiki - http://wiki.servicenow.com/index.php?title=Collapse_Section_on_Forms
Is it possible to do something similar for a variable set?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2014 08:45 AM
As long as you check the 'Display title' box on the the variable set you can use the following code (including the sys_id of the set) to toggle the display.
toggleVariableSet('SYS_ID_OF_VARIABLE_SET_HERE');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2014 08:42 AM
Variable sets are not displayed like a section as a whole. It all depends on the orders set on each variable.Hence I doubt if it is possible.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2014 08:45 AM
As long as you check the 'Display title' box on the the variable set you can use the following code (including the sys_id of the set) to toggle the display.
toggleVariableSet('SYS_ID_OF_VARIABLE_SET_HERE');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2014 08:08 AM
Thanks Mark! This would be for a client script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2014 09:08 AM
Correct, and it should work for both front-end and back-end forms.
Please mark my response as the correct answer to your question if this gives you what you need!