Client script to make a field mandatory for particular assignment groups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 05:44 AM
I belatedly realised that using UI Policy to make a field mandatory for particular assignment groups doesn't really work until the form is saved as there is no On Change option. I have been trying to locate knowledge articles that will allow me to borrow a Client Script but without much success.
My particular challenge is that I only want the field to be mandatory for groups that all sit under the same Parent group. Is this possible? I am ok to have the field visible to all, but just need to be Mandatory if the incident state is Resolved and the assignment group is a member of the 'All DW Groups' parent group.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 05:50 AM
Hey,
UI policies don't run "on change" like a client script, but can still work for your requirement as long as the 'on load' and 'reverse if false' options are true.
What filter were you applying to your UI policy?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 05:53 AM
Hi Kevin,
Ui policy should work for you? Can you show what / how you tried it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 05:59 AM
Thanks Anurag.
This is the UI policy that I created. It works fine if I am coming into an incident that has already been logged and assigned to the DW Support group and then change the State to Resolved. It doesn't work if I am logging a new ticket and select the assignment group. The field is only made Mandatory after I have Resolved the incident and saved the record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 06:03 AM
Right now you have both the conditions in AND operator, so basically both have to return true and when you log a new incident the state is not resolved, so your UI policy doesn't work.
Do you really need the condition to be together or its like if the assignment group.parent = XXX OR state is resolved? Change the condition or OR and see if it works for you.