Skip to tutorial content
Rate module Not yet rated

Data Policies vs UI Policies

2 min read
On this page

In this lesson, you will learn:

  • The key differences between data policies and UI policies
  • When to use each one
  • How to use them together

1 Two tools, two jobs

UI policies and data policies look alike. Both have a table, a condition, and a list of field changes. But they protect different things. πŸ›‘οΈ

UI policy compared with data policy. UI policy: runs on the client, in the browser. Works only on forms. Can set mandatory, visible, read only, and clear value. Can run scripts. Gives instant feedback while the user types. Data policy: runs on the server. Checks data from every source, including forms, imports, web services, and list edits. Can set mandatory and read only only. No scripts. Protects data quality.
Figure 1. UI policy = better forms. Data policy = better data.
UI policy Data policy
Runs on Client (browser) Server
Protects Forms only All sources: forms, imports, web services, list edits
Mandatory βœ… βœ…
Read only βœ… βœ…
Visible βœ… ❌
Clear value βœ… ❌
Scripts βœ… ❌
Found in System UI > UI Policies System Policy > Rules > Data Policies

2 Which one should you use?

  • Showing, hiding, or clearing fields? UI policy. Only it can do that.
  • Making a form friendlier? UI policy. It reacts instantly.
  • The rule must hold no matter how data arrives? Data policy.
  • Both? Use a data policy with Use as UI Policy on client checked.

πŸ’‘ Good to know: Think of it like a building. The UI policy is the friendly sign at the front door. The data policy is the lock on every door. πŸ”

⚠️ Heads up: Don’t build the same rule twice, once as a UI policy and once as a data policy. It’s harder to maintain. Use one data policy with Use as UI Policy on client instead.

⭐ Remember: UI policy = client, forms, can hide. Data policy = server, all sources, can’t hide.

3 Let’s try it: spot the right tool

  1. Open your Caller is always required data policy from Lesson 34.1. Is Use as UI Policy on client checked?
  2. Open a new incident. Is Caller mandatory on the form? (That’s the data policy acting as a UI policy.)
  3. Open your Network needs a CI UI policy. Could it be a data policy instead? What would you lose? (Hint: the script.)

4 Quick recap

  • UI policies improve forms. Data policies protect data
  • Only UI policies can hide fields, clear values, and run scripts
  • Only data policies check imports, web services, and list edits
  • Use Use as UI Policy on client to get both from one data policy

5 Check yourself

Think of your answer first. Then tap to check.

1 You need to hide a field when State is Closed. Which one? Show answer

A UI policy. Data policies can’t hide fields.

2 An import keeps creating incidents with no Short description. Which one fixes it? Show answer

A data policy with Short description mandatory and Apply to import sets checked.

3 Which runs on the server? Show answer

The data policy.

Nice work! You finished this lesson. πŸŽ‰

Was this lesson helpful?

Have a question or doubt?

Ask here and get help from instructors and fellow learners.

0 / 300

Only logged-in learners can post.