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.

Issue with hiding empty variable values in catalog client script

Rhonda9
Tera Expert

Hello,

I have created a catalog that actually has a widget.  I have been able to show/hide variable values for the first 3 tabs but when I get to the Order Summary, I want it to only show variables that has a value in it.  How can I accomplish that?

Rhonda9_3-1723743224366.png

Here is a snippet of the code I am working with (10 is the section of the Order Guide) 

 if (newValue == '2') {
        //display variables for tab 2
        g_form.setDisplay('variable1_tab2', true);
        g_form.setDisplay('variable2_tab2', true);
        g_form.setDisplay('variable3_tab2', true);

    }
   
        if (newValue == '3') {
            //display variables for tab 3
            g_form.setDisplay('variable1_tab3', true);
            g_form.setDisplay('variable2_tab3', true);
            g_form.setDisplay('variable3_tab3', true);
            g_form.setDisplay('variable4_tab3', true);
        }
       if(newValue == '10') {
       

 

 

 

2 REPLIES 2

Slava Savitsky
Giga Sage

The text of your question seems to be incomplete.

Sorry, I updated the question....