Business process setup guide (BPMS)
PDF
This documentation is valid for Creatio version 7.14.0. We recommend using the newest version of Creatio documentation.

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:

Fig. 1 Example of [Read data] element settings for reading a collection of records

scr_chapter_bpms_data_read_collection.png 

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.

Fig. 2 Reading data from specific columns

scr_chapter_bpms_data_read_signal_data_columns.png 

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.

Fig. 3 An example of outgoing [Collection of records] parameter of the collection type

scr_chapter_bpms_data_read_array_params.png 

Note

The complete list of element’s parameters is available on the [Parameters] tab in the [Advanced] mode. Read more >>>

See also

[Read data] process element

Process parameters

Did you find this information useful?

How can we improve it?