Skip to main content

Version: 24.04

Visibility Rules

Rules are used to affect the visibility of certain elements using configuration. The following code illustrates the configuration structure for rules.

rules: [
{
dataIndex: 'taskType',
value: ['Form', 'Review'],
},
{
dataIndex: 'formCode',
value: ['Saved', 'Submitted'],
},
];

If rules is defined in a configuration, the visibility of that configuration element depends on the rule conditions being met.

When rules contains multiple child objects, or value contains multiple values, they are combined as follows.

  • Multiple child objects are combined using an AND operator.
  • Multiple values are combined using an OR operator.

So, in the example above, the configuration element that rules applies to is visible if:

  • the taskType in the data is equal to Form OR Review; AND
  • the formCode in the data is equal to Saved OR Submitted.
info

rules is supported for the following configurations: Space, Attachments, Custom cards, Invoke, Timeline, Key Info and Custom Actions. For details, refer to the attributes of these configurations.

Attributes

To review the list of supported attributes, see API Reference.

In this topic