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,

Change: Applies to --> Catalog Item and select the catalog item name instaed of Variable set name

Use this g_form.setDisplay('VARIABLE_SET_NAME',false); on UI Policy or Client Script.

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

find_real_file.png

 

 

If answer is helpful please mark correct!

Thanks,

Pratiksha

As you mentioned above, UI policies are running which is taking precedence over catalog item UI policy . but I think that is not from London release I read somewhere,

UI policies are running which is taking precedence over catalog item UI policy . 

see this article,

https://medium.com/@mvsabhishek/catalog-ui-policy-vs-variable-set-ui-policy-bug-71c821917fe9

Hi Pratiksha,

Thanks for your Prompt response . I have tried this to hide few variables of one variable set but it is still same . 

we are using one Variable set in which we have one select box .Visibility of the variable set Variables  depend on the Option we select (This UI Policy is already working for Variable Set).

But I am trying to hide two  more variables for this Variable set of my catalog item(new). 

I have used the below catalog Client Script on my catalog item but no luck again .

 

if (g_form.getValue('var_user_type')=='Guest')

g_form.setVisible('variable_name_1',false);
g_form.setVisible('variable_name_2',false);

Thanks  

Hi Sheetal,

So you want to hide those 2 variables within the variable set based on the other variable value var_user_type

Is this for only few catalog items?

Regards
ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader