Ui Policie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
What exculty use in services now, why its use and whats it is importnat in services now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @sparit3737,
A UI Policy in ServiceNow is used to dynamically control the behaviour of form fields without writing any JavaScript code. We mainly use it to make fields mandatory, read-only, or visible based on certain conditions. For example, if an Incident state changes to Resolved, we can use a UI Policy to make the Resolution Code and Resolution Notes mandatory. It helps maintain data accuracy, improve user experience, and ensure users fill in the required information. UI Policies are important because they reduce unnecessary scripting and make form customisation easier to maintain.
Why is UI Policy important?
Make fields mandatory or optional.
Make fields read-only or editable.
Show or hide fields dynamically.
Maintain data consistency.
Reduce the need for Client Scripts for simple form-level requirements.
Real-time example: If the Incident category is Software, we can make the Software field visible and mandatory using a UI Policy.
You can refer offical ServiceNow documentation for UI Policy:
UI Policy API - ServiceNow Fluent
If you find my answer useful, please mark it as Helpful and Correct. 😊
Regards,
Soham Tipnis
ServiceNow Developer || Technical Consultant
LinkedIn: www.linkedin.com/in/sohamtipnis10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @sparit3737 ,
In Servicenow ,Ui Policies are used for dynamically changing the form's behavior based on a certain condition .
Whenever you want to change the state of field depending on the condition , For Example when the incident priority is critical then you can change the description field Mandatory/Read-Only/Visible .
So ,How this works and Why this is important :
1. When we need to validate the form.
-- Making field mandatory helps the crucial data to be stored . Empty field cannot be submitted.
2.You can set field non-editable using Read-only function .
3.You can set field visible or hidden using ui-policy. You can set a field visible when its required.
Example
Suppose the Incident form has a field called Preferred Mode of Communication, with options such as Mobile and Email. You can configure a UI Policy so that:
- When Mobile is selected, the Mobile Number field becomes visible and mandatory.
- When Email is selected, the Email Address field becomes visible and mandatory.
For more details you can refer servicenow documentaion by the below link :
https://www.servicenow.com/docs/r/platform-administration/t_CreateAUIPolicy.html
I hope this helps you understand UI Policies better.
Thank You.