Conditional dictionaries
Conditional dictionaries are an optional variant of regular dictionaries. Using the data passed to the dictionary, it is possible to write JavaScript conditions that will decide the visibility of selected values from the dictionary. For example, a subset of cities from the city dictionary based on a given voivodeship.
Dictionary definition
The conditional dictionary definition window, in addition to the standard elements, will have the section filled in Visibility conditions, Input parameters and keys and values linked to display conditions.
Condition definitions
Conditions are added in the side panel Visibility conditions, which will slide out after clicking the button in the left bar
.
Each row represents one condition, the index allows the condition to be linked with the dictionary keys and values. The condition should be described by a JavaScript expression using the input data from the mapping.

Input field mapping
In the Input parameters, which will slide out after clicking the button in the left bar
, we can define the input data for the dictionary. The column Variable means the name of the variable that we will be able to use in JavaScript expressions when defining conditions, and Alias means the variable name visible when attaching the dictionary as a data source.

Mapping conditions to keys
Each condition defined earlier is reflected in the keys and values table as a column, according to the assigned index. Checking the checkbox at the intersection of the row with the key and the column with the condition means that the value will be visible when the condition evaluates to true.

Condition evaluation
Conditions are evaluated in the order determined by the index (which translates to: from left to right in the keys table), with the first condition that evaluates to true determines the set of displayed values.
Using a conditional dictionary
We attach a conditional dictionary in the same way as a regular dictionary (instructions: Attaching the dictionary data source). The only difference is that you additionally need to specify mappings of input parameters to components:

Last updated
Was this helpful?
