Flow > Conditions


Conditionals

If

if-block

Checks whether the condition is true or false. If the condition is true, the blocks wrapped inside will execute.

if([BOOLEAN]) {
  [ACTIONS]
}

Otherwise

otherwise-block

Use directly below an "If" block. If the condition in the preceding "If" block is false, the blocks wrapped inside the "Otherwise" block will execute.

else {
  [ACTIONS]
}

Otherwise If

otherwise-if-block

Use directly below an "If" block. If the condition in the preceding "If" block is false, and the condition of this wrapper is true, the blocks wrapped inside the "Otherwise If" block will execute. Equivalent to doing the following:

equivalent-to-otherwise-if-block

else if([BOOLEAN]) {
  [ACTIONS]
}

Booleans

Booleans (denoted by a hexagon shape) are conditions that resolve to true or false.

And

and-block

Returns true if both of the provided conditions are true. If the first condition is false, the second condition will not be evaluated.

[BOOLEAN] && [BOOLEAN]

Or

or-block

Returns true if at least one of the provided conditions is true. If the first condition is true, the second condition will not be evaluated.

[BOOLEAN] || [BOOLEAN]

Not

not-block

Returns true if the condition resolves to false. Testing if not [CONDITION] is equivalent to if [CONDITION] = false.

![BOOLEAN]

True / False

true-false-blocks true-false-blocks

Literal values of true and false.


Boolean Conversion

boolean-convert-block

Converts the given value (typically text) into a Boolean. May throw a compile-time or runtime error if conversion is not possible.

asBoolean([VALUE])

Equality

Equals

equals-block

Returns true if both values are equal.

[VALUE] == [VALUE]

Not Equal

not-equals-block

Returns true if the values are not equal.

[VALUE] != [VALUE]

Comparators

Returns true if...

Operator Description
less-block First number is smaller than second number.
lte-block First number is smaller than or equal to than second number.
greater-block First number is larger than second number.
gte-block First number is larger than or equal to second number.
([NUMBER] < [NUMBER])
([NUMBER] <= [NUMBER])
([NUMBER] > [NUMBER])
([NUMBER] >= [NUMBER])