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 add multiple records

You can add multiple records to an object using the [Add data] element in the “Add selection” mode. For example, you can add activity participants based on the contacts who live in Boston. In this case, “Activity participant” will be the target object and “Contact” – reference object.

The added records will be based on a “selection”, which is a list of filtered records from another object. For example, you can add records to the [Participants] detail based on the selection from the “Contact” object (i.e., a list of filtered contacts). A filter by the [City] field will select all contacts who live in Boston, and an activity participant will be added based on each contact that matches filter.

The column values from the selection can be passed to the added records. For example, the records in the “Activity participant” object must be linked to the corresponding contacts. When adding activity participants, you can populate the contact fields of the new records with the values from the corresponding contacts in the selection.

To add a single record, populate the fields of the [Add data] element the following way (Fig. 1):

Fig. 1 The [Add data] element setup page in [Add multiple records] mode

scr_chapter_bpms_data_add_selection.png 

1.Select an object to which the records will be added. For example, to add records on the [Participants] detail of an activity page, you need to select the [Activity participant] object.

2.In the [What is the data addition mode?] field, select “Add selection”.

3.In the [Selection from an object] field, select the object whose data will be used in the new records. For example, we need to add activity participants based on the contacts who live in Boston. Hence, a selection from the “Contact” object is required.

4.Specify filter for the selection. If the filter is not applied, then Creatio will assume that the selection contains all records from the object specified in the [Selection from an object] field. For example, to get a list of contacts who live in Boston, apply a filter by the [City] column as shown on Fig. 1.

5.In the [Which column values to set?] field, add the columns that must be populated for the new records:

a.Click [+ Add field] and choose an object column from the list. A new field will be added in the [Which column values to set?] block. For example, when adding activity participants, you need to specify the activity and the participating contact.

b.Click the btn_process_element_settings_lookup00008.png icon in the field and populate it using standard functions of the Process Designer. For example, when adding an activity participant, add an [Activity] column and map it to a parameter that contains the Id of the needed activity, then add a [Participant] column and populate it with the contact Id from the selection (Fig. 2).

Fig. 2 Mapping the value of the new record to a column from the selection

scr_chapter_bpms_data_add_selection_set_contactid.png 

As a result, for each record from the selection, a new record will be added to the specified object. The record columns will be populated according to the settings in the [Which column values to set?] block. The other columns of the new record will be populated with default values or remain empty. For example, for each contact who lives in Boston, a new activity participant will be added. For each added record, the [Activity] field will be populated with the needed activity, and the [Participant] field (which is a lookup field based on the “Contact” object) will be populated with the corresponding contact from the selection.

See also

[Add data] process element

Process parameters

Did you find this information useful?

How can we improve it?