How to read data from multiple records (collection)
In the “Read collection of records” mode, the [Read data] element can obtain field values from several records. For example, you can read the names of all contacts of a specific account.
To read a collection of records, add the [Read data] element on the diagram and set up its properties:
1.In the [Which data read mode to use?] field, select “Read collection of records”.
2.In the [Which object to read data from?] field, select the object that contains the needed record. For example, to read contact data, select the “Contact” object.
3.Set up the filter. For example, to read all contacts of a specific account, set up a filter by the [Account] column (Account = ...) and use the [Compare with value] option to select a specific account, or use the [Compare with parameter] option to map the filter value to the value of a process or a process element parameter.
4.Specify the limit the number of records in the resulting collection by populating the [Read first ... records] field. If you need to select all records that match the filter, specify the number larger than maximum possible records.
Note
Reading more than 5000 records may cause performance issues.
5.If necessary, set up sorting in the [How to sort records?] block. Note that the process will read data from the first records in the list according to sorting rules.
6.Specify the columns whose values must be fetched:
a.Select “Read data from all columns” to read values of all columns of the record.
b.Select “Read data from selected columns only” (Fig. 2), then click [+ Add column] and select the columns whose values you are going to use further down the process.
Note
We recommend limiting the number of columns to read data from, as reading too many columns will affect process performance.
As a result, the [Read data] element will obtain the data of the specified columns for all records that match the filter and fit within the [Read first ... records] limit and pass their values to an outgoing parameter of the “collection” type.
Note
The complete list of element’s parameters is available on the [Parameters] tab in the [Advanced] mode. Read more >>>
See also