Make fields mandatory for catalog item variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2024 09:24 AM - edited 04-10-2024 10:28 AM
I have a question here ,
Please refer the img. When the checkbox is checked, the following two variables are visible and mandatory by the catalog UI policy.
Now, I've received a new requirement: If the first mandatory variable is filled out, the other becomes non-mandatory, and vice versa. Is this achievable? If so, how? Additionally, I prefer to avoid creating another UI policy on the same variable that might cause conflicts.
Thanks in advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2024 09:27 AM
Hi there,
Easiest without code would be 1 UI Policy with a condition if both fields are empty. If so, both mandatory. If one not empty, both not mandatory.
Not literally what you are asking, though that would be without using any code and only 1 UI Policy. Having both not mandatory should also not really be a functional issue, since 1 field does have a value. And when clearing that... the UI Policy kicks in again.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field