Conditions and operators
EngineSchema
Conditions are used in visible_conditions, required_conditions, and read_only_conditions.
They reference other fields and evaluate to true or false.
Condition shape
Code
You can combine conditions with and or or:
Code
Operators
| Operator | Meaning |
|---|---|
equal_to | Equals the provided value |
not_equal_to | Not equal to the value |
greater_than | Greater than the value |
less_than | Less than the value |
greater_or_equal_than | Greater than or equal to |
less_or_equal_than | Less than or equal to |
contains | Array contains the value |
starts_with | String starts with the value |
is_empty | Value is empty or null |
is_not_empty | Value is not empty |
Operator support by field type
Operators are validated against the referenced field type. For example:
- Text fields support
containsandstarts_with - Numeric/date fields support comparison operators
- Choice fields support
equal_toandcontains(multi-choice)
Choice conditions compare answer values rather than the renderer's wrapper object:
SingleChoiceFieldandBooleanFieldcompare the selected choicevalue.MultiChoiceFielduses an array of selected values.containschecks one value, whileequal_tochecks the complete selection without depending on order.- A non-empty custom “other” answer participates as its
valueor label, so emptiness operators reflect what the user entered.
If an operator is invalid for the referenced field, validation will fail.
Field references
field_id should point to the field key. data_name is accepted as a fallback, but key is
recommended because it never changes when labels change.
Last modified on