MergeRecords

Takes 5 parameters, FieldBase, GroupBy, MergeField, Delimiter, bKeepBlanks

Usage:

FieldBase, GroupBy, MergeField, Delimiter, bKeepBlanks
[WorkWith], GroupBy, MergeField, Delimiter, bKeepBlanks
[WorkWith], GroupBy, MergeField, Delimiter, [""]
[WorkWith], GroupBy, MergeField, [", "], [""]

Description:

This command performs the opposite function of ParseRecords.

 For all sets of Records in the WorkQuery where the GroupBy field matches, the first Record in the Set will be kept and each of the values in MergeField will be placed into the same Field in the first Record. Optionally, if the parameter bKeepBlanks is set, any such Records will be included as a blank value in the delimited list. If Delimiter is not specified, comma-separated values (CSV) will be used. For CSV, double quotes will only be placed around the values if the value includes a comma.

Example:

Given the following data:

Name | Interests
  1. Bob | Golf
  2. Bob | Computers
  3. Sally | Horses
  4. Sally | Rock Climbing

When executing: MergeRecords "Name", "Interests"
The following data will exist:

Name | Interests
  1. Bob | Golf, Computers
  2. Sally | Horses, Rock Climbing