Create a List Variable

A list variable is a one-dimensional array of elements, each of which is of the same type. For example, the text list variable ColorOptions shown below in the Assets Panel (in Execution mode) includes five elements, each of type text.

Each element in a list can be addressed directly by referencing its index number. The elements can be addressed sequentially, for example, by looping through the list using a For-Each function.

List variables can be created for simple types (e.g. Text, Number, Decimal) and complex types (e.g. Timer, HTTP Request, Outlook Item).

The table below presents examples of how list variables can be used:

List Variable Type

Element Type

Sample Usage

Simple List Variable Text Create a list of texts to concatenate.
Decimal Create a list of decimals to find their average or maximum value.

Complex List Variable

Outlook Mail Item

Create a list of emails to cycle through to find specified content.

Row

Create a list of rows to store table data, such as data from an Excel file or an HTML table.

See Process Tables

All list variables in the project are listed in the Assets Panel under Variables.

For details on the methods, properties, and events provided for list variables, see List Variables.

To create a list variable:

  1. In the Assets Panel, click next to the Variables header.

    The Variables and Types panel is displayed.

  2. From the Type dropdown, select a variable type from the List category.

  3. Enter the Variable Name of the new variable. Each variable must have a unique name.

  4. [Optional] Enter a Description.

  5. The list variable is created, and listed in the Assets Panel under Variables.