Switch#
Use the Switch node to route a Pathway conditionally based on comparison operations. It's similar to the IF node, but supports multiple output routes.
Examples and templates
For usage examples and templates to help you get started, refer to Ensemble's Switch integrations page.
Node reference#
Mode: select whether to define the conditions as rules in the node, or as an expression, programmatically.
Add Routing Rule: add comparison conditions using the dropdown. The available comparison operations vary for each data type:
- Boolean
- Equal
- Not Equal
- Number
- Smaller
- Smaller Equal
- Equal
- Not Equal
- Larger
- Larger Equal
- String
- Contains
- Equal
- Not Contains
- Not Equal
- Regex
Fallback Output: choose how to route the Pathway when none of the conditions match.
Related resources#
Refer to Splitting with conditionals for more information on using conditionals to create complex logic in Ensemble.