New field (Reassignment Reason) is visible/mandatory when assigned to is updated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2025 08:22 AM
i want to create a new field (Reassignement reason) which is (Visibile/mandatory) when the assigned to is updated
Icreate a UI Policy whith script; i also create a client script. But it's not working!!
Help please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2025 12:26 PM - edited 06-19-2025 12:27 PM
Hi @ahmed-24
Could you clarify the issue you're experiencing? Is the field not hiding even when you're not changing the value, or is it not appearing when you're trying to change the 'Assigned To' value?
Stay awesome,
Roshnee Dash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2025 12:25 AM
Hello @Roshnee Dash @AndersBGS i have created a new field on incident table ( u_reassignment_reason ) when assiged to changes this field appears (visible) on mandatory to put the reason for the assiged to update. so i made this script UI policy for this new field :
- Type: String or Choice (depending on your needs)
- Name: u_reassignment_reason
- Label: Reassignment Reason
- Name: Show Reassignment Reason
- Table: Incident
- Type: onChange
- Field name: assigned_to
- UI Type: All (or Desktop if mobile not needed)
(function executeRule(gForm, gUser, gSNC) {
var originalAssignedTo = gForm.getValue('assigned_to');
gForm.setMandatory('u_reassignment_reason', false);
gForm.setDisplay('u_reassignment_reason', false);
gForm.onChange('assigned_to', function(control, oldValue, newValue, isLoading) {
if (isLoading || newValue === '') {
return;
}
if (newValue !== oldValue) {
gForm.setDisplay('u_reassignment_reason', true);
gForm.setMandatory('u_reassignment_reason', true);
} else {
gForm.setDisplay('u_reassignment_reason', false);
gForm.setMandatory('u_reassignment_reason', false);
}
});
})(gForm, gUser, gSNC);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2025 01:58 AM
Hi @ahmed-24
1.You can create a UI Policy with UI Action:-
2.In condition just mentioned Assigned to Changes
3.Under Ui Action create select the custom field with
Mandatory as true and Display True.
4.For the field in Dictionary dont check for mandatory.
Stay awesome,
Roshnee Dash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2025 02:11 AM
@Roshnee Dash it's not working !!