UI Policies & Data Policies — Overview and Importance
ServiceNow allows admins and clients to edit the form fields as per their requirements. However, not all fields are editable by default platform policies govern who can modify what, and under which conditions. To maintain data Integrity and UX Control, there are rules and policies that define who can edit what.
Additionally, the UI policies allow admins to control the appearance and behavior of form fields on the client side, while data policies enforce data integrity rules on the server side at the database level.
By the end of this chapter, you will understand the key differences between UI and Data policies and when to use each.
What is UI Policy?
ServiceNow UI policies are the client-side rules that allow changes in behaviour, visibility, and accessibility of form fields in real-time. Admins can manage these field attributes using non-scripted client-side logic (meaning no JavaScript coding is required). The UI policies are defined on the sys_ui_policy table.
e.g., “For instance, a UI policy can make the ‘Priority’ field mandatory only when the ‘Category’ field is set to ‘Hardware’.
To access UI policies, navigate to System UI → UI Policies.
What are Data Policies?
Data Policies are server-side rules that enforce field-level constraints – such as mandatory or read-only – on data in ServiceNow. They are stored in the sys_data_policy2 table. Unlike UI Policies, which only apply to form submissions, Data Policies apply to all data operations, including import sets, web services, and mobile UI data.
UI policies are applied only to the data entered in the form; however, Data policies are the rules that can be applied to all entered data in a particular system, along with the import sets and Mobile UI data.
To access Data policies, navigate to System Policy → Rules → Data Policies.
UI Policy vs Data Policy: The Differences
Both UI and Data policies are applied to the data entered on the system. The difference starts with the type or way that data is received. The major differences are:
| UI Policies | Data Policies |
|---|---|
| It is applicable to data received via forms and can be seen by the users. | These rules affect the server-side data and are applicable to all data operations. |
| It works when a user is interacting with the form on the User Interface. | It works on all kinds of data transactions, including import sets, web services, and database operations. |
| Here, a field is made mandatory based on another field’s value in real time. | Here, fields are populated regardless of how a record is created or updated. |
Importance of UI policies
UI policies in ServiceNow are important to dynamically alter the form field behaviours based on specific conditions. The reason UI policies become so important is: Improved user experience: UI policies offer a simple and clear view of forms, making it easier for users. Iamge a cluttered form with over 30 fields; it seems exhausting. To resolve this, UI policies focus on what users should see and when.
Reduced data entry errors: UI policies act as a guide that helps keep the table clean and settled. By making fields read-only or hidden, as per the user input, it reduces the chances of contradictory information.
Dynamic form behavior without scripting: With the ServiceNow Low-code interface, UI policies can be built, tested, and deployed by the admins via simple dropdown menus. It ensures that UI policies do not break during platform upgrades, saving hours of testing.
What’s Next?
Now that you understand what UI and Data policies are and how they differ, let’s move on to creating them. In the next topic, we will be covering the ways to create a new UI policy, along with the steps to convert a Data policy into a UI policy.
Next Topic