How do I add conditions to a form?

In this example, we'll add a condition that specifies that a form displays only if a certain Case priority level is reached. First duplicate the layout, or choose your layout, then do the following:

  1. Click the Click to add condition link.

    Rule condition UI

  2. From the Attribute drop-down list, select the priority code value: $fields.PriorityCd.value(), then in the Value field, enter: ORA_SVC_HIGH as shown in the following example:The case conditions settings.

Now the layout will only display when a case has a priority value of High.

Example of Making a Layout Visible Based on Category Conditions

Here's an example of how to make your layout visible when using category conditions:
  1. In the categoryId field add the value within single quotes as follows:

    $fields.CategoryId.Value() === '123'

  2. For the categoryName field to display, you must expose it in one of the create layouts.

  3. Create a dummy layout and expose categoryName and use the category Name value in the conditional rendering.

    For example:

    $fields.CategoryName.Value() === CategoryName Document URL and section