Define conditions for your variant
You can define conditions to determine when a page variant is shown. The conditions are based on setting an order, and declaring the criteria that must be met for the page variant to display.
This video shows you how to perform the following procedure.
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
Open the main page for your demo experience.
Select the experience you created, and select Default.
Demo Experience Editor page.
- On the Default variant under the All users record page, select the Menu icon (
Menu icon\), and select **Duplicate variant**.
On the Tell us about your variant screen, enter Incident record page in the Name field.
Since the intent of this task is to restrict this page to users who are opening a record in the Incident table, enter the following under Conditions:
In the Parameter field, select table.
In the Operator field, select is.
In the Value field, replace the text with
incident.When you created this page earlier in the series, you set this condition to the Task table. Now, you are configuring the page to display only to users accessing a record from the Incident table.
Parameter field with dropdown options 'table' and 'sysId', along with Operator and Value fields.
- Select Create.
Incident record page in Demo Experience Editor page.
**Note:** You can view the structure of your pages and variants in this experience. The **Conditions** column shows a **View** link for each page. You can select **View** to see the condition for that variant \(that is, table=incident\). The **Audiences** column for the Admin only variant shows a 1. You can select the **1** to view the role required to view that variant.
Parent Topic:Learn UI Builder by example
Related topics
Create a demo experience to explore UI Builder
Create a record page using a template