$switch

The function "switch" inserts parameter 4 if parameter 3 equals parameter 1, inserts parameter 6 if parameter 5 equals parameter 1, ... (if no option matches parameter 2 is inserted as default)
Syntax
    $switch{value}{default_action}{value_1}{value_1_action}{value_2}{value_2_action} ... {value_n}{value_n_action}
DocumentationConditionally perform statements based on an expression:

    Parameters:
      value, the value to be compared with value_1 through value_n for equality.
      default_action, the action to be performed if none of value_1 through value_n equals value.
      value_1 through value_n, the values to be compared with value for equality (must be unique).
      value_1_action through value_n_action, the apropriate action to be performed in case value equals to value_1 or value_2 ... or value_n.
Examples
Example 1:
    $set{color}{$getCurrent{color}}
    $switch{$get{color}}
    {you have selected a color without suitable action}
    {red}
    {you have selected red}
    {blue}
    {you have selected blue}
    {yellow}
    {you have selected yellow}

    Result 1:
    if the value of the current Variable "color" is "red":  you selected red
    if the value of the current Variable "color" is "blue": you selected blue
    if the value of the current Variable "color" is "yellow": you selected yellow
    if the value of the current Variable "color" is not "red", "blue" or "yellow": you selected a color without suitable action
Example 2:
    $getCurrent{action}
    $switch{$getCurrent{action}}{}
    {forward}
    {
    Forwardparameter
    <Form ACTION="sfs" method="post" name="Formular">
    <INPUT TYPE=HIDDEN NAME=t VALUE="onMailbox_created">
    <INPUT TYPE=HIDDEN NAME=i VALUE="$getCurrent{i}">
    <INPUT TYPE=HIDDEN NAME=u       VALUE="$getCurrent{u}">
    <INPUT TYPE=HIDDEN NAME=p       VALUE="$getCurrent{p}">
    <INPUT TYPE=HIDDEN NAME=action  VALUE="$getCurrent{action}"> eMail address:
    <input type=text name="address" size="30" maxlength="10"><br><br>
    <input type=submit>
    }
    {reply}
    {$include{reply_template}}
    {delete}
    {$include{delete_template}}

    Result 2:
    if current action is "forward":  execute forward action
    if current action is "reply": includes and executes "reply_template"
    if current action is "delete": includes and executes "delete_template"
GroupControl_Flow
Minimum required transaction-mode:NONE
Required scripting permission of the developerPERMISSION_FL_BASIC
Minimum parameters2
Maximum parameters <unlimited>