switch
This block is part of the condition group and was last modified in core v12.0.4.
switch v12.0.4 Returns a condition based on the given expression.
In pins 2
- expression required
valueThe expression to evaluate.
- default
conditionThe default statement to be executed.
Out pins 2
- output
conditionReturns the condition matching the expression.
- match
conditionReturns true in case a match was found.
Matches the string on the value pin against the case states by exact, case-sensitive comparison. On a match: condition outputs whether that case's pin is exactly boolean true, and matched outputs true. On no match: matched is false and condition is the default pin's value when that value is truthy, otherwise nil. A falsy or non-string value never matches any case.
Version history
Introduced in v12.0.4.
Back to
condition Return to the main group to view all sub-groups Back to condition Return to the group to view all blocks within this group

