Control the conditions for a page variant

task brazil Updated Sep 10, 2026 3 min read control-conditions-for-your-variant.md
Raw file servicenow.com

Set the conditions and manage the criteria that determine when a page variant is displayed. UI Builder page variants enable you to create different versions of a page to tailor content for a specific audience.

Before you begin

Role required: ui_builder_admin

About this task

If you have multiple page variants that all have the same conditions, the variants go by the order setting.

Procedure

  1. Create a page variant.

    For more information, see Create a page variant.

  2. Set the conditions for a new variant.

    In this example, you configure a page variant to display when you open a record from the Task table.

    1. On the First, select a template screen, locate the Standard record template and select Use template.

      Note: Conditions can only evaluate parameters that have been added. In this example, the Standard record template includes the table and sys_id parameters.

    2. Enter a name for your page and select Continue.

    3. Review the URL parameters and select Looks good.

      Notice that table and sysId are added as required parameters, which appear in the URL preview.

      [Omitted image "control-conditions-parameters.png"] Alt text: Required parameters 'table' and 'sysId' along with the URL preview for the page.

    4. On the Tell us about your variant screen, enter a name for your variant.

    5. In the form section, fill out the fields.

Field

Description

Example

Parameter

The aspect or attribute that you want to check.

table, sys_id****Note: Conditions can only evaluate the added parameters. However, conditions written for subpages inherit additional outputs from the parent page controllers, providing a wider range of parameters options.

Operator

The rule that compares the parameter to the value. It tells you how the comparison is made.

is, is not, starts with

Value

The number, text, or option input that you want to compare with the parameter.

"Incident", "12345", "Active", "Change Request"

**Note:** The **table** and **sysId** parameters are available options for the **Parameter** field because they're required parameters as a part of the **Standard record** template.
    \[Omitted image "control-conditions-fields.png"\] Alt text: Tell us about your variant screen with 'Name' set to 'Task', 'Parameter' to 'table', 'Operator' to 'is', and 'Value' to 'task'.

6.  Select **Create**.
  1. Review the conditions created for your variant.

    1. In the Experience view, find the variant for which you want to view the conditions.

    2. Select the View button to display the conditions set for that variant.

  2. Edit the existing conditions for your variant.

    1. From the Experience view, find the variant for which you want to edit the conditions.

    2. Select Settings.

    3. Under Conditions, select Edit conditions.

      The condition you previously set appears. You can update these fields.

    4. On the Edit variant conditions screen, next to the condition, select the and([Omitted image "control-conditions-and-button.png"] Alt text: Button labeled 'and'.) or or([Omitted image "control-conditions-or-button.png"] Alt text: Button labeled 'or'.) button to add another condition and specify the criteria.

      For example, by adding the following AND condition ([sysId] [is] [abcd1234]), you configure the page variant to display when you access a record from the Task table with a sys_id of abcd1234.

      Note: You can add AND or OR conditions. To mix both types, you must write an encoded query.

      [Omitted image "control-conditions-and.png"] Alt text: Page variant conditions with 'table = task' AND 'sysId = abcd1234'.

    5. Select Enter as text to write an encoded query that specifies the criteria.

      The Edit variant conditions screen displays the encoded query field, where the conditions you previously set are shown in encoded query form: table=task^sysId=abcd1234.

      For example, by adding the following 'OR' condition (^ORsysId=efgh5678), you set the page variant to display when you access a record from the Task table with a sys_id of either abcd1234 or efgh5678. For more information on writing encoded queries, see Encoded query strings.

      [Omitted image "control-conditions-or.png"] Alt text: Edit variant conditions screen displaying encoded query 'table=task^sysId=abcd1234^ORsysId=efgh5678' in the field.

Parent Topic:Create a page variant

Search documentation
Search document titles and file paths on the brazil branch