Switch
Switch Function
Works similar to a switch case statement. Switch will evaluate each condition and return ReturnValue on the first condition that evaluates True.
Syntax
Switch (scalar Condition, ReturnValue, Condition, ReturnValue...)
Arguments
| Argument | Description |
|---|---|
scalar Condition | Boolean condition |
scalar ReturnValue | Value returned by Switch when the corresponding condition evaluates to True |
Examples:
Switch( IsNull([FusionTestTable.VarcharColumn]),10, [FusionTestTable.VarcharColumn] = "Jay", 20, [FusionTestTable.VarcharColumn] = "Scott", 30, true,40)
Return the corresponding value if condition is matched and 'true' denotes returning 40 when the condition are not matched, false denotes the rest of records that do not match cases return.