Enterprise 11: Use variables liberally

Use variables throughout the bot code. Avoid hardwiring values into bots. Hardwiring values makes the code less configurable for customers' environments.

Create new variables for an automation from the Variable Manager. The Variable Manager shows the local variables that are defined for each specific task. To create a new user variable, follow these steps:

Procedure

  1. Go to Workbench > Variable Manager.
  2. In the Variable Manager, click Add at the bottom or right-click an existing variable and select Add.

    In the Add Variable window, the Create New Variable option is selected by default.

  3. Select a Variable Type.
    Enter a name and select the method for determining the value of the variable.

Next steps

Following are some important facts about using variables:
  • Developer-created variables can be used with most Automation Anywhere commands.
  • All command fields with the light bulb icon support variables.
  • Press the F2 function key to list all user and system variables that are available for a selection.
  • When a Task Bot runs, Automation Anywhere replaces the variable name with the actual value of the variable.