Select Case

 

Compares the value of an integer or string value in a variable against literal values (or with values held in other variables) and then branches accordingly.

 

For example, the action cell can route based on:

Properties

Select Case Section

Priority Section

Select Case Section

Option

Description

Variable type to compare

Select ‘Numeric’ to compare an integer variable, or ‘String’ for a string variable.

Case variable

Enter the defined variable, which must be of the type selected above.

Each configured case statement exit point added to the cell is listed in the Case Statements list. The action cell works down the list until a match is found and exits from that exit point.

Priority Section

This is the order in which the statements are tried. Drag a statement up or down in the list.  The default exit route is not listed and is always the last route to be tried.

Exit Points

Option

Description

<case statement>

This is taken when the value of the variable in the Case variable property (see above) satisfies the case statement(s) defined for this route. You create a statement by selecting a case and entering the compare value as a literal value (prefixed by =) or a variable of the appropriate type and then clicking  to add it to the list below. 

Note: string comparisons are case sensitive.

You can include more than one case statement in an exit point if the outcomes of all of these statements are to be handled similarly. For example:

No Match

This is taken when no <case statement> exit points are satisfied or if none have been created. You create a No Match route by enabling the 'No Match' switch. 

Error

This is taken if an internal error occurred.