Client script to make a field mandatory for particular assignment groups

Kevin Parker
Tera Expert

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.

10 REPLIES 10

Kieran Anson
Kilo Patron

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?

Anurag Tripathi
Mega Patron
Mega Patron

Hi Kevin,

Ui policy should work for you? Can you show what / how you tried it?

-Anurag

Kevin Parker
Tera Expert

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.

 

KevinParker_0-1709560588708.png

 

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.

 

 

-Anurag