Define Command Variables

A parameter variable is a pointer to a changeable value. Using a command parameter as a variable enables the script execution agent (a user or another script calling the script) to provide the variable value on run-time at the beginning of script execution 

How to define command variables

In this example, the user is asked to provide the SMS destination number before the beginning of the script execution. A run-time variable (SMS_Destination_Number) is used for storing the destination number in the context of the Text parameter of the Type text command

  1. When you press Play to execute a script, you are asked to provide the values of the rum-time variables
    value_variable
  2. When you set the parameter usage type to variable in the script canvass' parameter panel, the variable has to be already defined. This definition is performed in the Variables side panel
    predefined_variable
  3. To define a parameter, open the Variables panel
    variable_panel
  4. The Variables panel is where you define and review the variables that are valid for the current script. All script variables are listed according to their type
    variables
  5. In the variables side panel select the variable type for the variable that you want to define. The variable type has to match the type of the parameter to which it will be assigned. In our example, we select the string type, since we want to define a variable for the string type text parameter of the Type text command
    variable_parameter
  6. After you select the variable type, add the new variable
    string_type
  7. Set the variable as a run-time variable so that you could provide its value at the beginning of the script execution
    set_runtime
  8. The new variable is defined and can now be assigned to all String type parameters in the script
    assign_variable
  9. Back in the script canvass, you can now assign the defined variables in the parameters panel