Logic

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

InputAcceptsRequired
ValueAnyYes
Case1ValueAnyYes
Case1ResultAnyYes
Case2ValueAnyOptional
Case2ResultAnyOptional
DefaultAnyYes

Outputs

OutputProduces
ResultAny

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.

Related nodes