Add a Display Rule action

Use a Display Rule to dynamically control what is displayed on a form or how the controls on the form behave. For example, you can hide one or more fields on the form, make a field read-only or disabled, and more. At runtime, the Display Rule is invoked once the user clicks the configured control with the defined action.

You can configure a control's display properties to change automatically in real time, based on what the user enters into the form. For example, when filling in an online Insurance form, if the required job title is not available in the Occupation list, the user can select the Other option, which would display an additional field to enter the job title. However, if the user selects an occupation from the predefined list of job titles, the additional text box does not appear.

What is a Display Rule?

A set of conditions defined for one or more fields and display states enforced when the conditions are met or not met.

A display rule consists of the following four main elements.

Element Description
Field A field on the form, form variable, or global variable.

Use the following controls in a condition to trigger a display rule:

  • Label

  • Text box

  • Drop-down

  • Radio Button List

  • Check Box

  • Calendar

Note The Button, Toolbar, Table, Image Button, Hyperlink, Tab and Horizontal Rule controls cannot be used in a condition, as they do not expose any properties for use within a condition.
Operator
  • Less Than "<"

  • Greater Than ">"

  • Equals "="

  • Not Equal "< >"

    Example: Field1 = "£30,000"

Value A static or a dynamic value. You can use a form field, form variable, or global variable as a dynamic value.
Display States Based on a true or false condition and the control used, the display states can change to one of the following:
  • Read-only

  • Enabled

  • Disabled

  • Hidden

  • Mandatory

  • Optional

  • Visible

Note Use logical operators ("AND" or "OR") to construct multi-field conditions. For example, Field1 = £50,000 AND Checkbox = Checked or Unchecked.
  1. On the Form Modeling bar, click Actions.
  2. On the Actions page, click Add Generic Add.
  3. On the Type list, select Display Rule.
  4. Enter a Name and Description for the action.
  5. Optionally, configure a unique action for each language separately. See Configure multilingual actions for a form or control for more information.
  6. In the Rule box, enter the rule to invoke upon clicking the control.

    Note the following:

    • You can use static values, dynamic values, or a combination of both-static and dynamic values-in your display rule.

    • You can reuse the display rule by copying and pasting it in another display rule.

  7. Under True Outcome, set the display state to enforce when the condition is met:
    1. Consume the required field or cell in the Name box.
      Note You can also use table columns in the outcome.
    2. On the Display list, select the required display state.
    3. Click Add Add.
      Note You can define the same display setting for multiple fields.
  8. Under False Outcome, set the display state to enforce when the condition is not met.

    The order of execution of rules depends on the order in which they are consumed in an event. For example, consume the following two display rules as follows:

    Display Rule 1, where Field1 = 10 and Field2 = Mandatory.

    Display Rule 2, where Field1 > 5 and Field2 = Optional.

    The last rule is applied. Therefore, Field 2 is set as optional.

  9. Click OK.

    The newly created action is added to the table.

  10. Click Save.
  11. Associate the action with the control to trigger this action. To call the Display Rule action upon form load, associate the action with the form. See Associate an action with a form or control.

    Follow the given rules while creating a display rule action, otherwise warning messages appear:

    • The value of the field must be valid. For example, the value for a String data type field must be a piece of text, or the value of Numeric data type field must be in numbers.

    • You may have no conditions set for a rule, but set at least one display state within a rule.

    • Specify at least one outcome (true or false); all outcome fields must be complete.