Skip to main content

Switch

Compare one value with each case in turn and run the steps of the first case that matches; Default runs when none does.

Command in the Core toolkit · id core/switch · 3 inputs, no outputs

Inputs​

InputTypeRequiredDefaultWhat it is
ValueAnyNoValue to compare with each case's values: text, a number, a $reference or an expression.
MatchStringNoequalsHow a case value matches: equals (like ==, so 5 and "5" match), contains, starts_with, ends_with, regex (the case value is a pattern), or expression (each case value is a condition and the value is not used).
Ignore caseBooleanNofalseCompare text without upper/lower case.