A UI policy in ServiceNow changes how fields behave on a form when conditions match. Use it to show a relevant field, hide an unnecessary one, or make an answer mandatory. Define the condition separately from the field action, then test what happens when the condition becomes true and false.
Choose the field behavior before building the policy
Start with a sentence that describes the decision: when a record reaches a particular stage, a named field should become visible and required. That sentence gives you three separate things to configure: the record context, the condition, and the action. Avoid combining unrelated requirements into one policy just because they affect the same form.
Suppose a team wants to collect handover notes when a Normal change reaches Closed. The requirement needs more detail than “show notes at closure.” Identify the field, decide whether an answer is required, and specify what should happen for other change types. Agree those outcomes before configuring the form so the test checks a business decision rather than merely confirming that a field appeared.
Decide whether you are changing a table field or a service catalog variable. Record UI policies and catalog UI policies have different configuration paths. Catalog rules can also target variable sets. Keep that distinction visible in your design notes so a rule intended for an ordering screen does not become a rule on the wrong record.
If you are also planning the surrounding experience, the UI Builder and workspaces guide provides the broader context. Keep this field behavior requirement specific enough to test independently of the page layout.
Build a UI policy in ServiceNow for a record field
The Change Request example uses the admin role to add a UI policy. The target field must already exist on Change Request [change_request]; an action cannot reference a field missing from its table. Confirm that prerequisite before creating a policy record.
Use an illustrative field created by your team, Closure handover notes, for the Normal-change closure requirement. This is a proposed configuration, not a field you should assume is already installed. Check that the field exists on Change Request and verify the type and state choices available on your instance before proceeding. The intended outcome is a visible, required notes field when both Type is Normal and State is Closed.
Review the rule as two linked records: the policy holds the qualifying condition, while its action names Closure handover notes and changes Mandatory and Visible to True. Leave the wording of the policy description specific to that outcome. A reviewer should be able to distinguish this requirement from a rule affecting another field without opening every action.
To create that configuration, reach UI Policies through Configure in the Change Request form context menu. Create a policy for the Change Request table with the agreed description and the two conditions. Save the policy through its context menu; the UI Policy Actions related list then becomes available. Create an action there for the existing notes field, enter the two True settings, and submit the action. Before testing, compare the saved condition and field selection against the agreed outcome. A policy with the right description can still point to the wrong field.
The condition identifies the records that qualify; the action identifies the field that changes. Check those two parts separately during review. A correct action attached to an overly broad condition can expose a field at the wrong stage, while a precise condition with the wrong Field name changes the wrong part of the form.
For this example, test a Normal change in Closed and one outside that state, then test a different change type in Closed. Record whether the notes field is visible and required in each case. These comparisons check each condition separately. Agree and test the field behavior outside the qualifying case as well; success in the matching case alone does not establish that the whole requirement works.
Configure catalog visibility and required answers
Creating a catalog UI policy through Catalog Administration requires admin. Navigate to All > Service Catalog > Catalog Administration > Catalog UI Policies and select New. Set Applies to to A Catalog Item, then select the intended item. For a reusable rule, A Variable Set makes Variable set available instead.
Use Catalog Conditions to express the trigger through variables belonging to that item or variable set. Give those variables names and include them on the form so their conditions can be evaluated; a variable hidden by a UI policy or made read-only can still participate. Select Active to enable the policy.
In Catalog UI Policy Actions, select Variable name and set the properties deliberately. Mandatory, Visible, and Read Only each offer Leave alone, True, and False. Use Leave alone for a property this action does not need to change. That makes the intended effect easier to inspect when several rules touch the same question.
Consider an illustrative request that asks whether equipment needs delivery. When the answer indicates delivery, show the delivery instructions and require an answer. Define the intended behavior for the opposite answer too. With Reverse if false selected, the policy reverses when Catalog Conditions evaluates to false. Test the transition in both directions rather than checking a single completed form.
On load applies the catalog policy when the form loads. Clearing it applies the policy when the form changes. Choose according to whether an existing answer should affect the initial display, then test opening the form with qualifying values already present.
For help planning this work, see ServiceNow implementation.
Test the screens and competing actions
A catalog policy has separate application settings for different screens. Applies on a Catalog Item view covers the order screen in the requester view. Applies on Catalog Tasks and Applies on Requested Items address the corresponding fulfiller forms. Applies on the Target Record supports records created for task-extended tables through record producers. Select the contexts the requirement actually covers.
Write a short test record for each selected context: initial answer, expected visible questions, required answers, and result after changing the trigger. For a hidden question, also check whether its existing value should remain. Catalog actions distinguish visibility from value handling; Value action offers Leave alone, Set value, and Clear value.
Mandatory behavior can explain an apparent visibility failure. In catalog policies, an empty mandatory variable cannot be hidden or made read-only. Making a hidden or read-only variable mandatory makes it visible or editable. A container or variable set with an empty mandatory variable cannot be hidden either. Inspect the required state before assuming the visibility action failed.
Order matters when matching catalog policies overlap: evaluation proceeds from lower values to higher values. Actions also have Order, and competing actions on a variable or variable set consider the lowest order. Review both the policy and its actions rather than changing a number without identifying the competing rule.
Keep a separate check for responsive presentation. A successful field rule does not establish that the surrounding page works at smaller widths. Use the responsive authoring and breakpoints guide when planning that review, and the layouts and component composition guide when the issue is page structure.
Separate browser behavior from data requirements
A hidden field and a protected data requirement solve different problems. Converting a data policy to a UI policy changes its reach: the resulting UI policy acts at the browser layer rather than applying to import sets or SOAP imports. The conversion deactivates the original data policy. Treat that as a change in enforcement scope, not a cosmetic adjustment.
The data-to-UI conversion requires admin. Open All > System Policy > Rules > Data Policies, select the existing record, and use Convert this to UI Policy under Related Links. If the goal is to extend the data policy to the UI, consider Use as UI Policy on client instead. Conversion provides the Visible setting for controlling field visibility.
The opposite conversion requires ui_policy_admin. Under All > System UI > UI Policies, open the record and choose Convert this to Data Policy. Eligibility requires Run scripts cleared, Global selected, and Visible set to Leave Alone on the actions. Visibility actions set to True or False prevent that conversion. The conversion deactivates the UI policy; retain UI behavior through Use as UI Policy on client on the data policy.
Questions about catalog policy edge cases
Can an editor create a policy inside Catalog Builder?
Yes. That action requires catalog_builder_editor, catalog_admin, or admin. Open All > Service Catalog > Catalog Builder, create or edit an item, and open UI Policy. Select Add new behavior, define the behavior, and select Add behavior.
Can a policy target one variable inside a multi-row variable set?
A catalog UI policy action can target the complete multi-row variable set, but not individual variables inside it. Check that boundary before choosing a design that depends on changing one inner variable.
Can attachment and masked variables receive a set-value action?
The set-value UI policy action does not apply to attachment or masked variables. Clearing is a separate operation; use the variable-clearing option when removal is the intended behavior.
Do layout variables support the same actions as questions?
No. Mandatory and Read Only do not apply to types including Break, Container Split, Container End, UI Macro, UI Macro with Label, Label, and UI Page. Visibility also does not apply to Break, Container Split, or Container End.