-
Notifications
You must be signed in to change notification settings - Fork 83
Collections
These extensions deal with record collections.
Table of content
- Add or Insert Record
- Aggregate Record List
- Clone Record List
- Dedupe Record List
- Extract Strings From Records
- Filter Records With Formula ℹ️
- Filter Records With Field Value
- Get Record at Index
- Join Record Lists
- Remove Record
- Sort Record List (deprecated)
- Update Record List With Map
ℹ️ These components are part of the Apex Formula Evaluator package.
Adds or inserts a record in a list.
Type: Invocable Action
Inputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Record list |
record | SObject |
Record to be added or inserted |
index | Integer |
Optional index in collection |
Outputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Updated record list |
Calculates an aggregate operation (sum, average...) on a list of records.
Type: Invocable Action
Inputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Record list |
fieldName | String |
The API name of the field on which the aggregate operation is being run. Values of the field must be parseable as Decimal . |
operation | String |
The aggregate function that will be used. One of: SUM , AVERAGE , MIN , MAX
|
defaultValueForNullFields | Decimal |
Default value used when a field is null. |
Outputs:
Name | Type | Description |
---|---|---|
decimalResult | Decimal |
Aggregate operation result as a Decimal. |
stringResult | String |
Aggregate operation result as a String. |
Clones a list of records.
Type: Invocable Action
Inputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Record list |
Outputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Cloned record list |
Builds a list of records with unique field values.
Inspired by Adam White & Danny Tilton
Type: Invocable Action
Inputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Record list |
fieldName | String |
API name of the field that holds the unicity key |
Outputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Deduped record list |
Extracts specific field values as strings from a list of records.
Type: Invocable Action
Inputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Record list |
fieldName | String |
Field name |
removeDuplicates | Boolean |
Remove duplicates from output |
joinDelimiter | String |
Join delimiter used to produce joinedValues output. Defaults to a comma. |
Outputs:
Name | Type | Description |
---|---|---|
values | List<String> |
List of field values |
joinedValues | String |
List of field values joined into a string with joinDelimiter
|
ℹ️ Note: This action is part of the Apex Formula Evaluator package.
Filters a list of records with a formula.
Type: Invocable Action
Inputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Record list |
formula | String |
A formula that will be evaluated against records from the list. Example: $Record.Name == "Trailblazer Co."
|
Outputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Filtered record list |
totalRecordCount | Integer |
Total record count before filtering |
filteredRecordCount | Integer |
Filtered record count |
Filters a list of records with a field matching a value.
Type: Invocable Action
Inputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Record list |
fieldName | String |
Field name |
fieldValue | String |
Field value |
Outputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Filtered record list |
totalRecordCount | Integer |
Total record count before filtering |
filteredRecordCount | Integer |
Filtered record count |
Gets a record at a specific index in a list.
Type: Invocable Action
Inputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Record list |
index | Integer |
Index in the list |
Outputs:
Name | Type | Description |
---|---|---|
record | SObject |
Record at the specifed list index |
Joins two record lists.
Type: Invocable Action
Inputs:
Name | Type | Description |
---|---|---|
collection1 | List<SObject> |
First record list |
collection2 | List<SObject> |
Second record list |
Outputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
A record list that contains the two input collections |
Removes the record at a specific index in a list.
Type: Invocable Action
Inputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Record list |
index | Integer |
Index in the list |
Outputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Updated record list |
Sorts a record list with multiple sort keys.
Deprecated: use Flow's native Collection Sort element.
Type: Invocable Action
Inputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Record list |
sortKeys | String |
Array of objects in JSON format. Example: [{ "field":"Name", "direction":"asc" }]
|
Outputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Sported record list |
Updates a record list based on a map.
Type: Invocable Action
Inputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Record list |
keyValuePairs | String |
Map of new field values in JSON format. Example: { "Rating" : "Hot", "NumberOfEmployees": 1000 }
|
Outputs:
Name | Type | Description |
---|---|---|
collection | List<SObject> |
Updated record list |
ℹ️ These components are part of the Apex Formula Evaluator package.