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.

How to hide empty catalog variables on service catalog form

Rhonda9
Tera Expert

Hello experts,

 

I have a requirement to hide any variables that does not have a value while the user is on the form. 

If a person is ordering parts and they have 2 quantity types.  The end user fills in one of the quantity single text variables and leave the other empty.  The empty field disappears. I can do this in ui policy with 2 quantity options but with more than 2 quantity options on the form, the boxes are not hiding as expected.   What is the best way to get this to work?  Or how can I write this in a script?

Rhonda9_0-1715008798071.png

 

4 REPLIES 4

SAI VENKATESH
Kilo Patron
Kilo Patron

Hi @Rhonda9 ,

 

It will work by using the UI policy and I have tried in my PDI with 4 quantity variables. It is working fine as Expected .

 

Could you please send me the conditions how you are configuring in UI policies

 

Thanks and Regards

Sai Venkatesh

Rhonda9
Tera Expert

This is what I have.  There is a ui policy for each quantity variable.  

Rhonda9_0-1715012738742.png

 

SAI VENKATESH
Kilo Patron
Kilo Patron

Hi @Rhonda9 ,

 

Attached is the image and you can try by following the same pattern

 

 

Thanks and Regards

Sai Venkatesh

Rhonda9
Tera Expert

Okay, I will give it a try and get back with you