Unable to hide Variable set variables for one catalog item.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2020 05:35 AM
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
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2020 05:41 AM
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.
If answer is helpful please mark correct!
Thanks,
Pratiksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2020 05:50 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2020 05:15 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2020 05:49 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader