Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

setVisible on Variable Set in Catalog Item onLoad script

jasonthorngren
Giga Contributor

I have record produce which I run g_form.g_form.setVisible('variable_set_1', 'false'); in a onLoad script and it hides the entire variable set, however, I try the same technique on a Catalog item and it does not work.  I have also tried setDisplay as well. I usually end up having to code it for each variable in the set.  I did notice that setVisible needs true/false set in '' and that setDisplay does not.  Is there something I am missing?  I tried copying the exact same script from the record producer to the catalog item still fails.  I know the script is running from the console log but that one line of code seems to not happen.  Please, any help is appreciated.  Thanks!!

5 REPLIES 5

Take a look at the below.

https://community.servicenow.com/community?id=community_question&sys_id=7f6834aedbfaab004abd5583ca96191d

https://community.servicenow.com/community?id=community_question&sys_id=89d147a9db98dbc01dcaf3231f96193c


Please mark my response as correct and helpful if it helped solved your question.
-Thanks