How do I add conditions to a form using VB Studio?

In this example, we'll add a condition that specifies that a form displays only if a certain SR severity 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 severity code value: $fields.SeverityCd.value(), then in the Value field, enter: ORA_SVC_SEV1 as shown in the following example:

    Setting the conditions for severity.

Now the layout will only display when a service request has a severity code value of 1.

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