The [Read data] element fetches data from the system objects to be used by other process elements. Use this element to:
-
Get field values of a specific record.
-
Calculate the sum, average, minimum or maximum value of a specific column for a number of records.
-
Calculate the number of records.
Note
In advanced mode, the element setup page contains additional parameters and connections with system records. The advanced mode is intended to be used by developers. Regular users are advised to use the regular mode of the element setup page.
Fetching field values from a specific record
The “Read the first record in the selection“ mode is used for fetching field values from the first record in the specified object. On the element setup page, specify the list of columns whose values must be calculated.
Below is an example of reading an opportunity data (Fig. 24).
1.In the [Which data read mode to use?] field, select “Read the first record in the selection“.
2.In the [Which object to read data from?] field, select “Opportunity“.
3.Specify conditions for reading data. For example, filter the opportunities by the “Needs analysis“ stage.
4.Select record sorting mode. Select a column to sort records by a sorting mode (“Ascending“ or “Descending“).
5.Specify the columns whose values must be fetched, or select “All columns“ to fetch all data.
Note
It is recommended to specify columns, as this will improve process performance.
Calculate function
The “Calculate function“ mode is used for getting the sum, minimum, maximum or average value of a number column in the specified object.
Below is an example of calculating the average amount of closed opportunities (Fig. 25).
1.In the [Which data read mode to use?] field, select “Calculate function“.
2.In the [Which object to read data from?] field, select “Opportunity“.
3.Specify the function to use for calculation. To calculate the average opportunity amount, select “Average“ in the [Function] field.
4.Select the record column by which the value must be calculated. The needed value is stored in the “Opportunity amount” column.
5.Specify filter conditions for record selection. To fetch data for closed opportunities only, set filter by the [Stage] field.
Calculate the number of records
This mode is used for calculation of the number of records that match specific filter conditions. For example, you can calculate how many opportunities were won.
Below is an example of calculating the number of records (Fig. 26).
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 ”Opportunity”.
[How to filter records?] – specify the filtering conditions for the list of records in the selected object or one of its subordinate objects. To get the list of closed opportunities, apply filter by the [Stage] field. For example, to calculate records set the account type to "Customer". If the account type is not set, the total number of accounts will be calculated..
Next
•[Modify data] process element
•[Delete data] process element
•[Change access rights] process item
•[Script task] process element