Integration Cloud 6.6.0 | Built-In Services | Built-In Services | groupDocuments
 
groupDocuments
Groups a set of documents based on specified criteria.
Input Parameters
documents
Document List Set of documents to be grouped based on the specified criteria.
groupCriteria
Document List The criteria on which the input documents are to be grouped. Valid values for the groupCriteria parameter are:
*key. Key in the pipeline. The value for key can be a path expression. For example, "Family/Chidren[0]/BirthDate" retrieves the birthday of the first child from the input Family document list.
*compareStringsAs. Optional. Valid values for compareStringsAs are string, numeric, and datetime. The default value is string.
*pattern. Optional. pattern will be considered only if the compareStringsAs parameter is of type datetime.
Note:
If key is not found in all the input documents, the documents that do not match the groupCriteria are grouped together as a single group.
Output Parameters
documentGroups
Document List List of documents where each element represents a set of documents grouped based on the criteria specified.
Usage Notes
The following example illustrates how to specify the values for the groupCriteria parameter:
key
compareStringsAs
pattern
name
string
age
numeric
birthdate
datetime
yyyy-MM-dd
The input documents will be grouped based on name, age, and birth date.