- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2024 07:35 AM
In this article, I will be showing you how to create a UI Policy for Beginners. This is a step-by-step guide that will give you as a starter a full understanding of how the UI Policy works.
Let us dive in!
In ServiceNow, UI Policies are used to dynamically manage the user interface by setting conditions that can show, hide, make fields mandatory, or set fields as read-only based on the user’s interaction or data context. Here’s a general overview of how UI Policies work and how to create and configure them:
What is a UI Policy?
A UI Policy is a rule that applies changes to the user interface based on specific conditions. This allows you to modify form behavior without having to write scripts.
Key Features of UI Policies:
- Visibility: Show or hide fields on a form.
- Mandatory Fields: Make fields mandatory or optional.
- Read-Only Fields: Make fields read-only or editable.
Components of a UI Policy:
- Conditions: Define when the UI policy should be applied (e.g., when a field value is changed).
- Actions: Specify what changes to make in the UI (e.g., show/hide fields, make fields mandatory).
To give you a better picture, let us drill down to the six steps:
Creating a UI Policy:
Navigate to UI Policies:
- Go to System UI > UI Policies in the ServiceNow application navigator.
Create a New UI Policy:
- Click the New button to create a new UI Policy.
Define Basic Information:
- Name: Enter a name for the UI Policy.
- Table: Select the table this UI Policy will apply to.
- Active: Ensure the checkbox is selected to activate the policy.
Set Conditions:
- Define when this UI Policy should apply. You can use field values, form states, or other conditions.
Add UI Policy Actions:
- Go to the UI Policy Actions tab to add actions.
- Specify the field, the action (show/hide, mandatory, read-only), and any other relevant details.
Save:
- Click Save or Submit to create the UI Policy.
Example Use Case:
Scenario: You want to make the "Close Notes" field mandatory when the incident state is set to "Closed".
Steps:
Create a UI Policy:
- Name: Make Close Notes Mandatory
- Table: Incident
- Active: Checked
Set Condition:
- Condition: state is Closed
Add UI Policy Actions:
- Field: Close Notes
- Action: Mandatory (Check the box to make it mandatory)
Save the UI Policy.
This policy ensures that when an incident's state is changed to "Closed", the Close Notes field becomes mandatory for the user to fill out before submitting the form.
Testing and Debugging:
- Test: Always test UI Policies in a development or test environment before deploying them to production.
- Debugging: If a UI Policy isn’t working as expected, check the conditions and actions. You can also use the browser’s developer console to ensure that no client scripts or other UI policies are conflicting.
UI Policies are a powerful tool in ServiceNow to enhance user experience and ensure data integrity by automating form behavior based on specific criteria.
Here is How: ServiceNow Fundamentals: How to Create ServiceNow UI Policies
Please mark as helpful if you find the article lucrative.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2024 04:56 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2024 09:17 AM
Good article @BillMartin. I've used UI Policies often for many of my team. I just created on the other day with conditions that if the category is Hardware, the model and serial number become mandatory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2024 04:56 PM