- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2022 08:38 AM
Hello,
I have a form with a string field 'Printer Name' that is mandatory by default, but I have setup a catalog UI policy where if a checkbox is selected the 'Printer Name' field should no longer be mandatory and become hidden. However it does not hide the field, if I turn off the mandatory setting on the 'Printer Name' field then the catalog UI policy works properly, but I need 'Printer Name' to be required. Can anyone see what I am missing here?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2022 08:41 AM
Hi,
On your UI Policy, please select "reverse is false" checkbox and see if that helps.
With the field having the mandatory checkbox set within it's dictionary, the UI Policy and/or Client Script should, in theory and my past experience, override the dictionary, as you also thought, but perhaps with the reverse if false not checked, it's not having it engage and in those moments when the UI Policy results true, it's not overriding, for some reason.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2022 08:41 AM
Hi,
On your UI Policy, please select "reverse is false" checkbox and see if that helps.
With the field having the mandatory checkbox set within it's dictionary, the UI Policy and/or Client Script should, in theory and my past experience, override the dictionary, as you also thought, but perhaps with the reverse if false not checked, it's not having it engage and in those moments when the UI Policy results true, it's not overriding, for some reason.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2022 08:46 AM
Thanks this did it. This and being in the proper domain (I was initially in global) fixed the issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2022 08:44 AM
Hi there,
On your second image, it's shown that the variable is mandatory. This is in the way. Make your variable conditionally mandatory using a UI Policy instead of having the mandatory=true set on the variable itself, than the conditionally visible will also work.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020-2022 ServiceNow Community MVP
2020-2022 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field