I have a Yes/No variable and I set "No" as the default value. It is not working...what I'm trying to do is a "work around since my UI policy isn't working either. I'll attach emails. Please HELP.

samuelscott
Tera Expert

I have a Yes/No variable and I set "No" as the default value. It is not working...what I'm trying to do is a "work around since my UI policy isn't working either. I'll attach emails.

The goal is to have "none" as de default value which works. BUT, since UI policy is not being enforced (when the page loads, it doesn't work, however, when you toggle yes-no-none, it does). I'm now trying to set default value as "Yes" to see if that makes

my other values toggle their visibility.

Please HELP.

 

find_real_file.png

find_real_file.png

find_real_file.png

 

find_real_file.png

6 REPLIES 6

Sukraj Raikhraj
Kilo Sage

Yes/No can be translate to true/false....

Check out this post:

https://community.servicenow.com/community?id=community_question&sys_id=28270329db1cdbc01dcaf3231f96190d

Allen Andreas
Administrator
Administrator

Hi,

A Yes/No variable does in fact work with a default of Yes or No...I just tested this myself.

find_real_file.png

find_real_file.png

For your UI Policy, you have this taking effect on "catalog tasks". See below the condition where you have nda is yes...you only have catalog task checkbox checked. Is that where your screenshot is from? If it's from the requested item (RITM)...then your policy won't work there and all fields would show.

Also on those variables (those 4 in your UI policy)...if you have the "mandatory" checkbox checked on their settings page...they will always show. You must only control mandatory through UI Policy. Ensure their mandatory settings are not checked on the page:

find_real_file.png

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi,

I just wanted to check-in on this and see how things are going?

If my reply above helped guide you correctly, please mark as Helpful & Correct.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

You might notice that although that looks like the same "No" it is not.  Check the production of your form and find two Nos and a Yes (three choices) available by adding the word "No" to the default variable field box..