- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 06:00 AM
Hi experts,
I have field in incident table called effort(u_effort)
i want to make it mandatory on condition that
if state is changed to resolved or assignment group changes.
I have written a UI policy marking when state is changed to resolved and setting the efforts feild to mandatory.
but i cant find condition like " assignment group changes" in UI policy unlike in business rules.
Can how can i achieve this.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 06:06 AM
Hi Manasa,
With mandatory fields, you typically do not make them mandatory on a change, just on a set of conditions. You don't have access to changes in a ui policy so you'd have to use a client script or multiple to accomplish that.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 06:06 AM
Hi Manasa,
With mandatory fields, you typically do not make them mandatory on a change, just on a set of conditions. You don't have access to changes in a ui policy so you'd have to use a client script or multiple to accomplish that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 06:09 AM
I agree. To do this, you will have to put it in a client script. I wish that the UI Policy and Data Policy condition builders had the 'changes' set of values that business rules have, but they don't right now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 06:17 AM
That is something I miss as well the "changes" option in conditions
The way I know is to make a this is either to have two onChange client scripts watching both assignment group field and state and make the field mandatory when needed. of course you can have 1 ui policy for the state is resolved and 1 onChange client script for the assignment grp changes.
Other way is make a before Business rule that checks if it is filled in otherwise set it as mandatory and cancel the submit.
//Göran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 06:46 AM
Laxmi,
Here is a post that display which field has been modified in the form, you can check if assignment group or state has been changed and do your logic :
http://www.servicenowguru.com/scripting/business-rules-scripting/checking-modified-fields-script/