Switch Case
Last updated
Last updated
Switch Case node lets you check for a condition based on a variable which might be the result of some other conditions as well. Depending on the value of the variable, the Flow Execution will be sent to the branch matching that particular value.
As you see in the below image, a Switch Case node comes with two default child branches - Default Case and Add Case branch. You can keep adding cases in the switch as well as use the Default Branch for Default case.
If you try adding the Switch Case node between 2 existing nodes, you will see a popup asking you which branch should the existing children be part of.
This is because Switch Case node breaks the flow into 2 or more separate branches, which never merge.
Field | Description | Required |
---|---|---|
Node name | true | |
Switch Value | The value which needs to be checked in the Switch condition. This can also be a Magical Autocomplete. | true |
Switch Value Type | The datatype of the Switch values to be typecasted into. | true |
Cases | A list of cases to be checked, else default case. Each case creates a new branch in the Flow Builder. | true |
condition
- The boolean result of the condition at runtime. You can access this using Magical Autocomplete (Eg. $.<node_name>.condition
) in any node below this node.