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. |
| Field name to switch | Specify the field name that contains the value to use as a basis for the row routing. |
| 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 | Here you can specify a value-target step pair, one per row. To specify a null value, simply leave the value column blank while entering a target step. Please note that it is possible to specify the same target step more than once. |
| 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. |
| Enable case-match logging | When selected, the step emits a log entry for each input row, indicating whether it matches a case or takes the default path. In other words, we log a message for every row to show if the field value matches any specific case or default. |