- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2019 12:29 AM
Hello,
What is the difference between data policy and ui policy?
regards,
Bhavna
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2019 02:25 AM
Hello Bhavana,
Here are my observations about Data and UI Policy:
#Data Policy:
- Data policy is "server side"
- Data policies can apply rules to all data entered into the system.
- Data Policy Rules : mandatory and Read Only
- Converting Data Policy to UI Policy deactivates the data policy
- Alternatively you can use Use as UI Policy on client
- Apply to import sets - If selected, the data policy applies to data brought into the system from import sets. This option also applies to web service import sets.
- Apply to SOAP: If selected, the data policy applies to data brought into the system from a SOAP web service. Scripted SOAP web services are not affected. This field does not affect data policy interaction with REST web services.
- No option to run on onChange / onLoad
#UI POLICY: Governs form and form field behavior, client side
- UI Policy Actions: Read Only, Mandatory, Visible, Clear the field value
- UI Policy Related List Actions : hiding related list on form
- Run Scripts: UI Policies do not always require scripting.
- Global: If Global is selected the script applies to all views for the table. If the Global field is not selected you must specify the view
- Reverse if false: Take the opposite action when the Condition field evaluates to false. Execute if false script to run
- Order : The order of evaluation is from the lowest number to the highest number
- UI Policies execute after Client Scripts.
- Converting a UI policy to a data policy deactivates the UI policy. To retain the policy in the UI, ensure that the Use as UI Policy on client check box is selected on the data policy record.
Criteria |
Client Script |
UI Policy |
Execute on form load |
Yes |
Yes |
Execute on form save/submit/update |
Yes |
No |
Execute on form field value change |
Yes |
Yes |
Have access to field's old value |
Yes |
No |
On Change on Multiple Field |
No |
Yes |
Execute after Client Scripts |
No |
Yes |
Set field attributes with no scripting |
No |
Yes |
Require control over order of execution |
*Yes |
Yes |
Apart from this, Mark gave you the links so you refer.
Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2019 12:30 AM
UI policies apply in the client so when a user is interactive on the form. Data policies operate on the database so any requests to the database will have to conform to the data policy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2019 12:32 AM
Hi Bhavana,
Basically the UI policy is client side and the Data policy is "server side".
If you want to test, make a read only UI policy on a field description and then try to modify this field on a "list view"
Then, do the same with the data policy.
So UI Policy is more useful if you want to display fields and data policy if you want to make mandatory or readonly fields (without ACLs) ==> You could have some exceptions sometimes
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy.
Thanks,
Ruhi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2019 12:32 AM
Hi Bhavana,
UI policy works on front end i.e. when user has interaction with the form. It runs on client side
Data policy is used to enforce some constraints on the fields whenever records inserted/updated from API or integration. They work at server side
you can convert UI policy to data policy via related link present under UI policy
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2019 12:33 AM
Hi there,
The Docs pages describe both pretty nice. Be sure to check it out:
https://docs.servicenow.com/bundle/newyork-platform-administration/page/administer/field-administrat...
https://docs.servicenow.com/bundle/newyork-platform-administration/page/administer/form-administrati...
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field