Switch
Matches a value against up to two cases and returns the result paired with the matching case, falling back to a default when nothing matches. Use it where a single If is not enough, such as mapping a label like a region or scenario name to the number that goes with it.
Inputs
| Input | Accepts | Required |
|---|---|---|
Value | Any | Yes |
Case1Value | Any | Yes |
Case1Result | Any | Yes |
Case2Value | Any | Optional |
Case2Result | Any | Optional |
Default | Any | Yes |
Outputs
| Output | Produces |
|---|---|
Result | Any |
Example
A Dropdown lets you pick EMEA, AMER, or APAC. Connect its value to the
Switch: Case1Value EMEA returns a commission rate of 0.20, Case2Value AMER
returns 0.15, and Default returns 0.10 for everything else. Changing the
dropdown swaps the rate through the whole model in one step.