Skip to main content

SWITCH

Evaluates an expression against a list of values and returns the result corresponding to the first matching value.

CategoryLogical
SyntaxSWITCH(expression, value1, result1, [value2, result2], ..., [default])

Parameters

ParameterRequiredDescription
expressionRequiredThe expression to evaluate and compare against values.
value1RequiredThe first value to compare against the expression.
result1RequiredThe result to return when expression matches value1.
value2OptionalAdditional value to compare.
result2OptionalResult to return when expression matches value2.
defaultOptionalThe value to return if no match is found.

Example

SWITCH(condition, value)

Auto-generated from the EngCanvas function registry.