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.

Your task can read the file and change the value of the variable, reassigning the value at each data point in the file. To create a value type variable using file assignment, follow these steps:

Procedure

  1. Determine the text file you will use for assigning values.
    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
  2. In the Workbench, click the Variable Manager icon at the top or on the tab on the right side.
  3. Click Add.
    The Add Variable window is displayed, with the Create New Variable option selected.
  4. Select type Value.
    Generally, this is the default selection.
  5. Enter a name for the variable.
    The name must begin with an alphabetic character and cannot contain spaces.
  6. Select the Read from text file radio button.
  7. 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.
  8. Click Save.
    After the variable is saved, it is displayed in the Local Variables section of the Variable Manager.