Define a custom script action

  1. Click Actions .

  2. To add an action, click Add Action .

  3. Type a name for the new action.

  4. Click Add Step. A list of previously defined actions appears, along with two other options:

    • If/Else: Evaluates a condition before executing an action.

    • Delay: Allows you to postpone the progression of a custom action for a certain amount of time.

      An action can execute one or more steps in sequence. Each step is a built-in action or a custom action. Actions can evaluate variables to determine whether steps run.

  5. Do one of the following:

    Select the action name.

    The selected action appears in the editor.

    An if/else construct allows an action to execute different steps based on the run-time value of a variable.

    1. Click If/Else. An expression editor appears.

    2. Under Left Hand Side, select the variable whose run-time value compares with something else.

    3. Next, select the Operator to use for the comparison.

    4. Click the options menu for Right-Hand Side.


      To select what to compare the Left Hand side variable to, choose Interpolated TextText Expression, or Variable.

      • Interpolated Text: Evaluates a string that contains the runtime value of one or more placeholders.
      • Text Expression: Compares to the result of a logical expression. See Dynamic variables.
      • Variable: Compares to the runtime value of a variable.
    5. Based on your selection, type text in the input box or choose a variable.

    6. Click Add Step, and then choose a built-in or custom action to execute when the expression evaluates True. Add any other steps to execute when the expression is True.

    7. To define steps to take when the expression is False, click Add Step under Else. This process defines an alternate series of steps that the action can take, based on the value of the Left Hand Side variable. 

      Note: The bottom-most Add Step button performs a special function. It defines additions steps for the action to take after actions in the conditional expression run. In programming terms, this behavior is equivalent to lines of code that follow an if…then…else expression. These steps always execute when the action is invoked, regardless of the variable’s value.

    1. Select Delay.

    2. Enter the amount of time to delay in milliseconds. From the options menu , choose whether that amount is as an integer, math expression, or variable.

    3. Click Add Step.

  1. Add other steps as needed.
  2. If you create multiple steps, you can use the up and down arrows to reorder them. Steps execute in top down order.
    Tip: To delete a step, click Delete Step .
  3. To finish, click Save.