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

How to calculate the number of records that match a condition

Use the “Calculate the number of records“ mode of the [Read data] element for determining the number of records that match specific filer conditions. This is usually used for determining whether specific records exist (i.e., the number of records is not “0”), or whether the number of records reaches specific threshold. For example, you can calculate the number of calls an employee has scheduled for today.

To calculate the number of records, add the [Read data] element on the diagram and set up its properties. Below is an example of calculating the number of records (Fig. 1).

Fig. 1 The [Read data] element setup area in the ”Calculate the number of records” mode

scr_chapter_bpms_data_read_number.png 

1.In the [Which data read mode to use?] field, select “Calculate the number of records“.

2.In the [Which object to read data from?] field, select the object (section, detail or lookup) whose records to calculate. For example, to calculate the number of activities, select the “Activity“ object.

3.In the [How to filter records?] block, specify filter conditions for record selection. The [Read data] element will calculate only the number of records that match the filter. For example, to calculate the number of the current user’s activities that are due today, set up the filter as shown on Fig. 1.

As a result, when the process is run, Creatio will access the data of the specified object, get a list of records that match the filter, and calculate the number of records in the list. The resulting value will be passed in the outgoing parameter of the [Read data] element.

See also

[Read data] process element

Process parameters

Did you find this information useful?

How can we improve it?