Contact Us 1-800-596-4880

Read from Array

The Read from Array Action Step is used to access the content of an array.

You can either return a value at a certain point in the array via an index or return the whole array as text. In the latter case, all values are listed as comma separated values.

The Read from Array Action Step provides the read values from the array automatically as various data types. You can decide later in the Workflow which data type you wish to use.

Properties

Get entire array as CSV (Bool, default: false) If active, the whole array is returned as a string in CSV format (comma separated values).

Index to read at*(integer, > 0, default: 1) Position within the array where the content of the array is to be read from. Indexing starts at 1.

Please make sure that the index entered is not greater than the total number of all elements within the array.

Inbound Variables

Array to read from (Array) The array that is to be read from.

The drop-down Array to read from list contains all the arrays that have been created in the Workflow so far. These can be Workflow Based Variables or return arrays from the Read from Excel File Action Step.

Index to read at*(integer, > 0, default: 1) Position within the array where the content of the array is to be read from. Indexing starts at 1.

Outbound Variables

The Read from ArrayAction Step automatically supplies four different return values. Each one represents one of the possible data types. Depending on what you want to use the data for, you will take a different data type. In a Keystroke, for example, you will use the data type AsString, or if it concerns a number that you want to use to manage how often a Loop is repeated, use the data type AsInt:

  • Read from Array.AsString (string) Return value as text

  • Read from Array.AsInt (int) Return value as a whole number

  • Read from Array.AsDouble (double) Return value as a floating-point number

  • Read from Array.AsBool (bool) Return value as a Boolean value

Please make sure that the content of the value read from the array is compatible with the desired data type.

For example, a character string such as "abc" cannot be converted into a meaningful integer number.

If you want to use the return value from the Read from Array Action Step in another in Action Step, a pre-selection will be made for you as to which data types can meaningfully be used at this point.

The following table provides an overview of the result of converting the data types:

From / to String Int Double Bool

String

unchanged

0

0

The strings True and true and all positive numbers > 0 are True; all others give False

Int

unchanged

unchanged

unchanged

If Int ⇐0, false; if Int >= 0 true

Double

unchanged

The decimal places are truncated

unchanged

If Double ⇐0, false; if Double >= 0 true

Bool

unchanged

0

0

unchanged

Each row refers to an outbound data type, each column to the result of converting to the data type in the column header.

Wizard

The drop-down Array to read from list contains all the arrays that have been created in the Workflow so far. These can be Workflow Based Variables or return arrays from the Read from Excel File Action Step.

If you select the checkbox Get entire array as comma separated values, the whole array will be returned as a string. The individual values will, of course, be separated by commas. The text field Index to read at and its content are deactivated in this case.

The Index to read at denotes the position within an array from which the content of the array is to be read. The first element has the index 1. The index can also be mapped to a variable. Simply click on the Pin symbol and select a suitable variable from the list. If you subsequently wish to set the variable manually, click on the Pin symbol again and select None. You can then enter a value manually in the input field. The input field and its content are deactivated if the checkbox above it is selected.

Example

For a detailed example, please refer to the description of the Get Array Count Action Step.