Make fields mandatory for catalog item variable

Bindhu1
Tera Contributor

I have a question here , 

Bindhu1_0-1712764156010.png

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.

1 REPLY 1

Mark Roethof
Tera Patron
Tera Patron

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

LinkedIn