Catalog Item Design

Bijay Kumar Sha
Giga Guru

Hi,

I've built a Catalog Item where there is one Variable which is a Select Box (drop-down list). There are 2 options (let's say A and B).

I've build 3 variable sets which contains many variables. 

I want when I open the Catalog Item, it'll show only one variable which is a select box. And when user selects one option out of 2, then it'll show 2 variable sets (let's say C & D) and hide E. And again if the user selects option B from the drop down, then it'll show 2 variable sets (let's say C and E). 

I've tried Catalog UI Policies, but I'm not able to show or hide variable sets. 

Currently, when I open the catalog Item, one variable and all the variable sets are getting loaded all the time. 

Please help me what I'm missing here. 

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Bijay Kumar Sha 

 

Something helpful

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.

 

https://www.servicenow.com/community/developer-forum/how-to-hide-variable-set/m-p/1969461#:~:text=Us....

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi @Dr Atul G- LNG ,

I tried both UI Policy and Client script, but the variable sets are not getting hidden when the catalog Item load. 

Hi,

You will need multiple UI Policies with different orders and conditions.

1. Create a UI Policy with condition Variable is None and set order as 100--> hide the variable sets that you want to hide.

2. Create another UI Policy with condition Variable is A [order 200] -> Add UI Policy actions to Hide unwanted Set E and to show Variable set D.

3. Create another UI Policy with condition variable is B [Order 300] -> Add Ui Policy to Hide set D and Show Set E.

 

IMP Note: Make sure to uncheck 'Reverse if false' on all U Policies.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande