- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
We have requiremet -
If value is '1', assignment1 , summary1, description1 should be mandatory and visbile.
If value is '2', assignment1 , summary1, description1 also assignment2 , summary2, description2 should be mandatory and visible.
If value is '4', assignment1 , summary1, description1 also assignment2 , summary2, description2 also assignment3 , summary3, description3 should be mandatory and visible.
I have already implemented this using a UI Policy based on the value of number_of_required_tasks.
But Now requirement is - We have Variable "checkbox" - named as "Additional Tasks and Approval not required" (Backend name - additional_tasks_and_approval_not_required)
If checkbox true -> fields/variables mentioned above should set to not mandatory.
I tried creating another UI Policy to set all variables as non-mandatory when the checkbox is true, and also tried adjusting the order of UI Policies, but it didn’t work.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
You should add the checkbox requirement to the other ui policies:
if value is 1 AND checkbox is false, make fields mandatory
if value is 2 AND checkbox is false, make fields mandatory
The 'revert if false' will ensure that if the checkbox is true, the ui policies won't be evaluated as true.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
You should add the checkbox requirement to the other ui policies:
if value is 1 AND checkbox is false, make fields mandatory
if value is 2 AND checkbox is false, make fields mandatory
The 'revert if false' will ensure that if the checkbox is true, the ui policies won't be evaluated as true.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
both the UI policies will try to conflict.
I will suggest to write onChange catalog client script 1 on Checkbox and 1 on Number of Required tasks
Then handle your logic based on the requirement.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader