SWITCH
Evaluates an expression against a list of values and returns the result corresponding to the first matching value.
| Category | Logical |
| Syntax | SWITCH(expression, value1, result1, [value2, result2], ..., [default]) |
Parameters
| Parameter | Required | Description |
|---|---|---|
expression | Required | The expression to evaluate and compare against values. |
value1 | Required | The first value to compare against the expression. |
result1 | Required | The result to return when expression matches value1. |
value2 | Optional | Additional value to compare. |
result2 | Optional | Result to return when expression matches value2. |
default | Optional | The value to return if no match is found. |
Example
SWITCH(condition, value)
Auto-generated from the EngCanvas function registry.