Control the conditions for a page variant
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.
Avant de commencer
Role required: ui_builder_admin
Pourquoi et quand exécuter cette tâche
If you have multiple page variants that all have the same conditions, the variants go by the order setting.
Procédure
-
Create a page variant.
For more information, see Create a page variant.
-
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.
-
On the First, select a template screen, locate the Standard record template and select Use template.
Remarque :Conditions can only evaluate parameters that have been added. In this example, the Standard record template includes the table and sys_id parameters.
- Enter a name for your page and select Continue.
-
Review the URL parameters and select Looks good.
Notice that table and sysId are added as required parameters, which appear in the URL preview.
- On the Tell us about your variant screen, enter a name for your variant.
-
In the form section, fill out the fields.
Tableau 1. Variant condition form section Field Description Example Parameter The aspect or attribute that you want to check. table, sys_id Remarque :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" Remarque :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. - Select Create.
-
On the First, select a template screen, locate the Standard record template and select Use template.
-
Review the conditions created for your variant.
- In the Experience view, find the variant for which you want to view the conditions.
- Select the View button to display the conditions set for that variant.
-
Edit the existing conditions for your variant.
- From the Experience view, find the variant for which you want to edit the conditions.
- Select Settings.
-
Under Conditions, select Edit conditions.
The condition you previously set appears. You can update these fields.
-
On the Edit variant conditions screen, next to the condition, select the and(
) or 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.
Remarque :You can add AND or OR conditions. To mix both types, you must write an encoded query. - Facultatif :
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.