Skip to content

Condition


Branching

Condition is a widget flow node that enables branching of the flow based on specified conditions.

Description

The widget flow node contains multiple branches, each of which may include conditions. Each branch is evaluated sequentially from top to bottom. A branch can operate in one of two combination modes: OR or AND:

  • OR requires at least one condition in the branch to be true;
  • AND requires all conditions in the branch to be true.

If a branch evaluates as true, the widget flow continues along that branch. If no branch matches, the widget flow proceeds along the default branch (if defined).

Configuration

The configuration consists of a set of branches. Each branch includes a number of conditions and a combination mode (OR/AND). Conditions may reference context values. Each condition uses an operator, and the following operators are supported:

NameDescriptionOperand Count
Equals (==)Checks if the two values are equal2
Not equals (!=)Checks if the two values are not equal2
Greater than (>)Checks if the first value is greater than the second (as number)2
Greater than or equal (>=)Checks if the first value is greater than or equal to the second (as number)2
Less than (<)Checks if the first value is less than the second (as number)2
Less than or equal (<=)Checks if the first value is less than or equal to the second (as number)2
EmptyChecks if the value is empty or not provided1
Not emptyChecks if the value is present and not empty1
ContainsChecks if the first value contains the second as a substring2
Not containsChecks if the first value does not contain the second as a substring2
MatchesChecks if the first value matches the given regular expression2
Not matchesChecks if the first value does not match the given regular expression2

WARNING

When using numeric operators (for example, Greater than), the value will be coerced into a number. If the value is not a number or is missing at the time of evaluation, it will default to 0. This rule also applies to context values.

Limitations

NameValue
Max branches5 w/o default OR 4 + 1 default (up to 5 in total)
Max conditions per branch10
Min conditions in branch1
Max condition value input length1024
Max compiled condition value lengthUnlimited
InputsExactly one
OutputsAlways equal to branches count

Context values

This widget flow node doesn't provide any context values.