About AutoMate Variables

A variable is a place holder for a changeable value. In AutoMate variables allow you to set up actions to be performed on values that will not be known until the task is run. You set up variables in Task Builder An intuitive development interface where AutoMate Tasks are created. Task steps are created by dragging-and-dropping actions from a palette in Task Builder and placing them in the sequence desired for execution. when you create the steps of a task.

Using Variables

Variables are commonly used when a task involves collecting data from a source and then performing some action on it. You use the variable to contain the collected data, and then set up the actions to be performed on the data by referencing the variable. For example you could create a variable that will be populated with the user's input in a form or message box. In another step you could perform a calculation on the data the user entered by referencing the variable. Like constants, , variables can also be used to represent data in a task that may be different from machine to machine or data that may be different every time the task executes.

Creating Variables

AutoMate's Create Variable action generates a variable which can be used to store dynamic values for utilization in any step of the task or any subtasks started with the Start Task action. The developer can enter a value to initially populate the variable during creation or the value field can be left blank. Instead, variables can be set with a value using the Set Variable action, which adds or changes the contents of an already existing variable. Certain available actions that support populating variables can also set or modify a variable's contents, such as the Input Box action. This action displays an input box allowing the user to enter a value which is saved to the variable specified.

Once a variable is created, it becomes available for use in subsequent steps of the task. It will appear on drop-down lists in places where a variable can be entered, and it can be used in expressions by placing the variable name between percent signs (%). For example %UserInput% tells AutoMate to populate the expression with the current value of the variable named UserInput.

It is important to note that in order for an AutoMate variable to used in a task step, it must initially be created within an earlier step.

Variable Naming Conventions

Variable names must contain only alphanumeric characters, must start with a letter and cannot contain spaces. Variable names are not case-sensitive. When choosing a variable name, it is good practice to select a name that is descriptive of what the variable holds. For example, if a variable holds the size of a shoe, then name it ShoeSize or TheSize. This makes the task more comprehensible. Also, be sure to avoid using BASIC keywords, functions, or instructions. Names such as DATE or TIME would create a conflict. One way to avoid this is to include distinguishing characters in the variable name such as VAR, THE or MY. For example, a date variable could be named MyDate, DateVar or theDate.

Variable names must be unique within a task, but can be repeated from one task to the next. For example, if you create a variable in one task named UserInput, you can create a variable of the same name in another task without any conflict occurring.

NOTE: You can duplicate not only variables, but whole blocks of steps and even entire tasks. For further information, see Copying Task Steps and Duplicating Tasks.

See Also

About Expressions

About Constants

Create Variable Action