Switch

You can select this activity for switching to a particular activity. You can enable the project to run a single option out of the multiple options defined in a preset condition.

This activity consists of a conditional expression and a collection of cases, each containing a corresponding activity or set of activities. The switch activity runs a single case in the collection if the case matches the conditional expression. If the condition does not match with any of the conditional expression, the default activity runs. The switch activity can be used instead of an If activity if the condition must be tested for three or more cases.

This table lists the properties for the activity.

Property Type Property Name Data Type Description
Misc DisplayName String The name to be displayed for the activity.
Input Expression Boolean/String/Int32/Object/Array of [T] The statement for a case to run. By default, this field supports the Int32 variable type. You can select a different statement type from the Type Argument list in the Select Type window.
TypeArguments Boolean/String/Int32/Object/Array of [T] Enables you to select the statement type that can be added in the Expression property. For example, int, string, or Boolean. After you select the type, the expression is displayed, and you can add switch cases. The default value is Int32. Click the menu to change this value.