Make change task fields read only, except if assigned to is the user

vw1
Giga Contributor

Hi

I have created a UI Policy with the below conditions: if these conditions are true, make fields in change tasks Read-Only.

find_real_file.png

I want to add a condition, that if "Assign to" = user, user can still edit the fields.

I have thought of adding a condition "Assign to is not (dynamically) me", but ServiceNow does not provide a filter option for "is not (dynamic)".

 

Are there any suggestions of which route I should go for? For example to not use UI Policy and something else instead.

 

Thank you. 

8 REPLIES 8

Ashley Snyder1
Giga Guru

An ACL would be a more robust way to do this, as users can still edit the columns on the list view by using a UI Policy, as it only pertains to the form.  

rajneeshbaranwa
Giga Guru

Using ACL would be best but you can also achieve it using ui policy .

 

U have to create new UI Policy by adding a condition if  assigned to = Me then make the read only false. In this case you have to ensure that this UI policy has higher order than your current UI Policy.

 

asifnoor
Kilo Patron

ACL. 

If not ACL, then go for client script and you can add a condition 

if(g_form.getValue("assigned_to") != g_user.userID)

Hope this helps.

Client Script would still allow other users to edit the fields in list view unless explicitly stated in an onCellEdit Client Script which would be more work to create and maintain than ACLs.