Hide Variable Set

Bhushan_Salseka
Mega Expert

Hello All,

I have created a variable sets. But on particular selection i am able to hide variable of variable sets. But i am not able to hide variable set title or header bar.

Can anyone suggest it.

Thanks

Regards

Bhushan Salsekar

1 ACCEPTED SOLUTION

Mujtaba Amin Bh
Mega Guru

Hello Bushan,



try this g_form.setDisplay('variable_set_name',false);



Replace 'variable_set_name' with the name of your variable set.



This will hide the complete variable set including title. You don't have to hide variables individually.



Do let me know if it works?


View solution in original post

20 REPLIES 20

Hendrik Odendaa
ServiceNow Employee
ServiceNow Employee

In my case I also needed to check that there aren't any containers in your variable set. If there are, you'll need to handle the containers in the variable set with their own line of code to set their visibility.
ServiceNow sees the variable set as something like a container, so having containers in the variable set confuses the UI Policy a bit.