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.

Unable to hide Variable set variables for one catalog item.

shweta5
Giga Expert

Hi Experts,

I am unable to run my catalog UI policy on variables of Variable set  over Catalog UI Policy on Variable Set . 

I tried Catalog Client script on my catalog item to hide the variable set variables but no luck .

I am using one variable set which is being used by more than 10 catalog items . On this variable set , two catalog UI policies are running which is taking precedence over catalog item UI policy . 

Please help me out to achieve this .

 

Thanks in Advance

 

24 REPLIES 24

Pratiksha Kalam
Kilo Sage

Hello,

Any update on this thread?

 

Thanks,

Pratiksha

manjusha
Kilo Guru

Hi Manjusha,

Thanks for your response . I have tried this but it's not working for my requirement as i have to hide the variables based on the option selection which is defined in that variable set . 

find_real_file.png

If i chose then it will show me some variables as per the UI policy running on this variable set  But for my catalog item . I don't want them all (want to hide two variables ) . 

 

Thanks 

Sheetal

Vallabh Baradk1
Kilo Contributor

Hi Sheetal,

You can use catalog client script outside your variable set. with code

g_form.setVisible('variable_name', false);

or

g_form.setDisplay('variable_name', false);

 

Please mark it correct if it works.

 

Thanks,

Vallabh Baradkar

Dxsherpa Technology Pvt Ltd.

Sumedh Kharode1
Kilo Expert

Hello,

You can use catalog client script /UI Policy  on your catalog item to hide unnecessary variable from variable set for the respective catalog item.You can do this by simply using below code:

g_form.setVisible('variable_name', false); or

g_form.setDisplay('variable_name', false);

 

Please mark it correct if it works.

 

Thanks,

Sumedh Kharode

Dxsherpa Technologies Pvt Ltd.