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.

UI Policy on variable Conditions not saving for Catalog Item

mattmm
Kilo Sage

I am creating a UI Policy to show or hide variables in my portal catalog item dependent on what is chosen in a select box variable.

When choosing the conditions "<variable name>" is "<actual variable name chosen>"

I save this to then setup my Catalog UI Policy Actions to show or hide the field , the condition then defaults back to " --none-- " (see second screenshot) as the variable name (i.e. "<variable name>" is --none-- ). Consequently my UI policy works as if it is --none-- and not what I chose before saving. Anytime I change, it defaults back to --none-- after saving.

NOTE: I've tried this with both "include None" and "Mandatroy" ticked and unticked with the same result. I also tried this with a multiple choice variable and same result. It works with a "Yes /No" variable though. 

What am I doing wrong, or is this a bug?

Screenshots below-

Catalog Item Variable-

find_real_file.png

Catalog UI Policy-

find_real_file.png

UI Policy Action-

find_real_file.png

1 ACCEPTED SOLUTION

I've resolved this with help. I had a blank space at the end of my variable choice values! Removed the space and all is working as it should!

View solution in original post

6 REPLIES 6

Omkar Mone
Mega Sage

Hi 

If i get this correct , you are saying that you get none even if you select different choice? I mean when the record is saved you get still none there? or it get's reset to none for new record?

Yes, so that second scren shot, if I change that field to my variable name, and save it, the field defaults back to --none-- (as circled in blue) after saving.

Hi 

I suggest if this is the case , Go with writing a client script just for a workaround. I don't really know why this must be happening because this is strange behavior.

 

Regards.

Omkar Mone.

www.dxsherpa.com

thanks, Yeah seems buggy!