- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2022 06:09 AM
Hi,
On the change request form we have the "State" field and this is a read-only field. We have an "Assess" UI action button which is the only way we can change state from "New" to "Assess". The requirement is that when status changes from New to Assess few of the fields need to be mandatory (say field1, field2). How to achieve this?
I am thinking of a way to use an UI policy and set these fields mandatory in all the other states except new state but I am just curious to know how to achieve it only when state changes from "New" to "Assess". I have also tried an onchange client script that sets fields as mandatory when old value is "-5" (new) and new value is "-4" (assess). This didn't work . Please help me in achieving this!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2022 12:36 AM
Then make it mandatory in UI action 'Assess', here is the link you can copy code and tweak accordingly
https://community.servicenow.com/community?id=community_question&sys_id=a323c3581b3dc110faf255fa234bcb78
Regards
Regards,
Musab

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2022 06:13 AM
Hello,
You can do this with UI policy , did you create UI policy ?
Regards
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2022 06:45 AM
Hi ,
Thanks for the reply!
yes I did create UI policy but with this the state first changes to "Assess" and then making field mandatory, but I want these fields to be filled already only then the state should be allowed to change to "Assess" from new.
It is like when I click the "Assess" button, if these fields are empty, it should set these as mandatory.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2022 12:36 AM
Then make it mandatory in UI action 'Assess', here is the link you can copy code and tweak accordingly
https://community.servicenow.com/community?id=community_question&sys_id=a323c3581b3dc110faf255fa234bcb78
Regards
Regards,
Musab

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2022 06:17 AM
Hi
I think the more secure option would be to use ACL.
Restrict access to certain field when state is Assess.
Mark Correct ro Helpful if it helps.
***Mark Correct or Helpful if it helps.***