Create a Value Type variable using file assignment
Create a value type variable using file assignment when the value of the variable needs to be retrieved from a text file while a task is running.
Determine the text file you will use for assigning
In the text file, ensure that the variable name exists, followed by an '=' operator. This ensures correct assignment of values.For example, Variable Name: Website Text file content: website = automationanywhere.com
- In the Workbench, click the Variable Manager icon at the top or on the tab on the right side.
The Add Variable window is displayed, with the Create New Variable option selected.
Select type Value.
Generally, this is the default selection.
Enter a name for the variable.
The name must begin with an alphabetic character and cannot contain spaces.
- Select the Read from text file radio button.
In the Select File field, browse to the file or type the
file path for the required text file.
Use the Open File button to view the selected text file.
After the variable is saved, it is displayed in the Local Variables section of the Variable Manager.