Collapse Section on Variable Set

rsanon
Tera Contributor

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?

1 ACCEPTED SOLUTION

Mark Stanger
Giga Sage

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


View solution in original post

9 REPLIES 9

Bhavesh Jain1
Giga Guru

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 Stanger
Giga Sage

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


Thanks Mark! This would be for a client script?


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!