Skip to main content

Switch

The Switch node enables the flow to proceed from the output ports for which the provided JavaScript expressions evaluate to true.

Switch

info

If you assign a value of true to the bottom Output port, it can serve as a default when none of the preceding evaluations return true. However, remember to enable the Break option. If it's left unchecked, the flow will proceed from all ports that are evaluated as true.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if the Catch node is used.

Options

  • Break: Allows the flow to exit the loop or switch prematurely when any output port's evaluation returns true. If this option is not selected, the flow can proceed from multiple outputs that evaluate to true.
  • Output Ports: This option requires an array of expressions, one for each output port. Input a JavaScript expression corresponding to each port. The provided expression will be evaluated using the input value.