Switch Case
Description
Switch / Case routes each incoming row to a specific target step based on the value of a designated field, similar to a switch/case statement in programming languages. Use this step when your workflow needs to direct data down different paths depending on a category, status code, or type field — for example, routing orders to different processing steps based on region or sending records to different outputs based on file type. It supports exact matching and contains-based matching, handles null values, and lets you specify a default target step for rows that do not match any defined case.
Configurations
| Field Name | Description |
|---|---|
| Step name | Specify the name of the step as it appears in the workflow workspace. This name has to be unique in a single workflow. |
| Value to switch | Specify the value to use as a basis for row routing. The field accepts variables, static values, or fields from a previous step. |
| Use string contains comparison | Enable checkbox to send rows to the first step whose case value is contained inside the field string value or in other words case value is found anywhere in the field being tested. If unchecked the value has to exactly match the field |
| Case value data type | Specify the data type of the values specified in this dialog |
| Case value conversion mask | Specify the conversion mask of the values specified in this dialog (numeric / date values) |
| Case value decimal symbol | Specify the decimal symbol of the values specified in this dialog (numeric values) |
| Case value grouping symbol | Specify the grouping symbol of the values specified in this dialog (numeric values) |
| Case values | Use the data grid to map values to target steps, configuring one condition per row. The grid supports the following routing behaviours: - Leave the value column blank to create a null condition. - To route different values to the exact same destination, assign the same target step across multiple rows. Note: If a row contains data in both the Value and Value Field Name columns, the step uses the Value and ignores the Value Field Name. |
| Value | Specify the value to evaluate and route data to the target step. The static value (or variable ${VAR}) to match against the Value to switch field. Takes priority over Value Field Name if both are filled. |
| OR | |
| Value Field Name | Select an input field to use as a dynamic case value. A field from the input row whose value is used as the case value. Used only when the Value column is empty. |
| Target step | Select the destination step to route the matching rows. |
| Default target step | Specify a default target step. All the rows that don't match any of the case values above are sent to this target step. |