- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2023 08:47 AM
Hi,
We are having UI policy, Data policy and both applies on same field on same table.
Which will get execute UI policy or Data policy.
Can anyone please confirm for it.
Regards,
Nivedita
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2023 09:38 AM
Data Policy is at server side. So even if you have a UI policy, the order doesnt matter. Data policy will apply
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2023 08:48 AM
Both....Data Policy will override UI policy though
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2023 08:57 AM
ex-I have one field caller and in ui policy I have set as caller is not mandatory and in data policy I have set as caller is mandatory. What will execute and which will get execute first.
Can you please confirm for this.
Regards,
Nivedita

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2023 09:38 AM
Data Policy is at server side. So even if you have a UI policy, the order doesnt matter. Data policy will apply
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2023 09:01 AM
Hi @niveditakumari ,
Both would run at the same time as potentially both are same.
The Data Policy and UI policy both implement data regularity by putting the filed attributes on the basis of certain conditions. Data policy gets executed in server- side and UI policy gets executed on client side. DATA POLICY implements data regularity by keeping as mandatory or read only field attributes. The UI policy logic gets applied to data entered in the form whereas the data policy logic gets executed no matter how a record changes. Scripts cannot be applied to Data policy.
Data policy gets triggered on the basis of conditions and they can take different actions as the conditions evaluates to true or false also we don’t need any script code to set the fields as mandatory or read only. Data policies largely similar to UI policies, but the UI policies gets applied to data that is entered inside the form through any browser. Whereas the data policy can be applied to any kind of data entered in the ServiceNow system, including the data that is being imported from the foreign sources like through import sets, web services etc.
We can convert Data Policy into UI Policy and vice versa. ON the UI policy form we can find a UI action button called convert this to the Data policy. Clicking this button will automatically generate a new data policy and will automatically take you to the form that will be displaying the new record, and from data policy to UI policy we will have to navigate to System Policy à Rulesà Data Policies, and then click the existing Data Policy, under the Related Links we will find a Convert this to UI Policy by clicking that a new UI policy record will appear, after that we need to edit the fields in it as we need them.
UI policies are client side functions that work on form and behaviour of form fields in UI policies we do not always need scripting.
UI Polices are used to make form field mandatory, visible and read only.