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

So have ServiceNow acknowledge that it's an actual defect or are they trying to pass it off as an "enhancement"?   I'm also shocked by the lack of updates to the Service Portal in these recent patches considering the amount of issues I've had, esp. in the portal view for catalog items.


Community Alums
Not applicable

Initially, I believe it was considered more of an enhancement, as I was told nested containers and container layouts were not supported in SP. However, it seems they have done some work on this now, as well as recognized the issue with the variable sets. I ended up going back to using the 'split' variable in my containers in order to get around the layout option not working, only to have the split setup break in patch five, and now the layout options work.



I really enjoy working in Service Portal, but it has a ways to go yet with how it renders forms and catalogue items. It's not as easy as they are making it out to be.


Hi,



You need to select the Run Script in UI type as 'Both' to make it work on portal.


Same applies for catalog clients script as those will also not work if its UI type is not selected as 'Both'.


melosborne
Mega Expert

Hello,



I am having the same type of issue with using g_form.setVisible() in a Catalog Client Script. I am using it to conditionally hide or display two separate variables. This works perfectly fine in the form, but the Service Portal seems to be ignoring setVisible() completely.



I have set the UI Type to "Both" and the rest of the Catalog Client Script is being recognized by the Service Portal, just not setVisible() or setDisplay()



Has anyone learned anything further about this still being an outstanding bug or a work-around?



Thanks,


Mel


r_gissarl_
Mega Expert

Hi,



Is there an solution to this issue ? I'm experiencing the same problem on Istanbul.



Thx a lot.