UI Policies

Create a UI Policy in ServiceNow

UI policies let you control form field visibility and behavior based on conditions — hide irrelevant fields, make others mandatory, or set them read-only. This guide walks you through creating a policy with conditions and actions that work reliably.

What UI policies replace

Before UI policies, developers controlled form behavior by writing custom client scripts for every form that needed dynamic field behavior. Each script was form-specific, hard to maintain, and usually broke when someone modified the underlying table. Form administrators — typically platform admins and application developers — spent time debugging JavaScript instead of configuring business logic. Users saw cluttered forms with irrelevant fields, or missed required information because the form didn't guide them properly.

How UI policies work

A UI policy is a condition plus a set of actions that run on the client side when form values change. The policy has a condition (like "Priority is High") that you build with the condition builder, and actions that control specific fields (make "Assignment Group" mandatory, hide "Workaround"). ServiceNow evaluates the condition whenever relevant fields change and applies or removes the actions based on whether the condition is true. The 'Reverse if false' setting controls whether actions get undone when the condition stops being true — leave it checked unless you specifically need sticky behavior.

Making policies production-ready

Basic UI policies work fine for user experience, but they run client-side only — users can bypass them by manipulating form data or submitting through integrations. For anything that affects data integrity or business rules, add server-side enforcement through Business Rules, Data Policies, or ACLs. The UI policy guides legitimate users; server-side rules enforce the requirements. Also consider performance: policies with complex conditions on large forms can slow down field interactions, so keep conditions simple and use specific field triggers rather than broad table policies when possible.

Before you start

  • admin role or ui_policy_admin role
Sourdough
Chrome Extension

Sourdough: ServiceNow Monitoring and Analytics

A Chrome extension for ServiceNow Admins and Developers with essential tools, analytics, graphs and monitoring features.

Instance HealthGraphs & ChartsAPI HealthDeveloper ToolsQuick SearchInstance Switcher
Add to Chrome

Free to install. Pro $5/month after a 14-day no-card trial.
Pro requires the ServiceNow admin role. Upgrade inside the extension.

Overview
Tasks
CMDB
API
Metrics
Monitor
Internals
Instance:sourdoughdev·Version:Yokohama
Instance StateONLINE
System StatusFully Operational
Session Timeout90 minutes
Logged-In Sessions2 (20 active)
Build Nameyokohama-12-18-2024_p1
IP Address10.159.128.43
Instance HealthHealth Score: 90%
🔥 5dSourdough (Chrome Plugin)Dark Mode

Step by step

1

Navigate to UI Policies

Go to System UI > UI Policies. Click New to create a new policy. The Table field determines which form this policy affects — choose your target table from the dropdown. Fill in a descriptive Name that explains what the policy does ("Hide workaround when priority is low" is better than "Priority policy").

2

Set the basic policy properties

Check Active to enable the policy immediately. Leave Reverse if false checked — this means actions will be undone when the condition becomes false, which is the behavior you want 95% of the time. Set Order to 100 unless you have other policies on this table that need specific sequencing. Leave the other checkboxes unchecked for now.

TIP

Order matters when multiple policies affect the same fields — lower numbers run first.

3

Build the condition

Click the Condition Builder icon (looks like a tree) next to the Condition field. Build your condition using the dropdown menus — select the field name, operator, and value. For example, "Priority is High" or "State is New". Click OK when done. The condition determines when this policy's actions will be applied.

4

Save the policy record

Right-click the form header and select Save to save your policy. Don't submit it yet — you need to add UI Policy Actions first, and the Actions tab won't be available until the record is saved.

5

Add UI Policy Actions

Click the UI Policy Actions tab at the bottom of the form. Click New to create an action. Select the Field name you want to control from the dropdown. Check the appropriate boxes: Mandatory to make it required, Visible to show it (uncheck to hide), Read only to prevent editing. Each action controls one field, so create multiple actions if you need to control multiple fields.

6

Configure action properties

Leave Cleared unchecked unless you specifically need to blank out field values when the condition is true. Set Order to 100 for the first action, 200 for the second, etc. This only matters if you have multiple actions affecting the same field in complex ways.

7

Test the policy

Right-click the policy form header and select Save to save your actions. Navigate to a record on your target table and test the behavior. Change the field values that trigger your condition and verify that the actions happen immediately. If it doesn't work, check that your condition field names match exactly what's on the form.

Best practices

  • Always implement server-side enforcement for mandatory fields and business logic — UI policies can be bypassed by users with browser dev tools or API access.

  • Use specific field conditions rather than broad ones — a policy that checks "Priority equals High" performs better than one that evaluates complex multi-field conditions on every keystroke.

  • Don't set fields to mandatory and hidden in the same policy — users can't fill in what they can't see, and you'll get confusing save errors.

  • Test policies with the Network tab open in browser dev tools — poorly performing policies will show up as excessive AJAX calls when users type in form fields.

  • Keep the Reverse if false checkbox checked unless you specifically need sticky behavior — unchecking it means actions won't be undone when conditions become false, which confuses users.

Test Your Knowledge

Quick 3-question quiz — see how your ServiceNow skills stack up.

Question 1 of 3Performance

A list view on a table with millions of records is slow. Best fix?

Select an answer to continue