Grouping data

GROUPLIST – Convert field values into list

613 views June 1, 2018 October 2, 2020 admin 2

Overview

This Custom Field takes values from the nominated field and creates a delimited list. The list can be separated by optional parameters for first, regular and last occurrence. The default parameter is a comma.

Syntax

GROUPLIST(‘GroupPath‘, ‘SortField‘, ‘SourceField‘, ‘FirstSeparator‘, ‘RegularSeparator‘, ‘LastSeparator‘, ‘AddAll‘, ‘AddEmpty‘)

GROUPLIST(‘Parent Category:Child Category‘,’Price‘,’‘,’,’, ‘‘)

Element Description
GroupPath Group path, delimited by colons
SortField The field to sort the records in the group by. Preface the field name with < or > to specify ascending or descending.
SourceField The field to retrieve the values from.
FirstSeparator The separator to use between the first and second value in the delimited list (optional).
RegularSeparator The separator to use in the delimited list after the second value in list (optional).
LastSeparator The separator to use in the delimited list between the second-last and last value in list (optional).
AddAll Add TRUE to include duplicate values within the list (optional). Without this, only distinct values will be shown.
AddEmpty Add TRUE to include empty values within the list (optional). Without this, only non-empty values will be shown.

Examples

GROUPLIST(‘Parent Category:Child Category‘,’Price‘, ‘Price‘, ‘, ‘, ‘, ‘, ‘and ‘)
In this example, the field will be populated with a comma delimited list of all Price fields in each ‘Child Category’ group, sorted by ‘Price’, with ‘and ‘ replacing the comma between the second-last and last value on the list.

Price GROUPLIST
12.00 12.00, 16.00 and 20.00
16.00 12.00, 16.00 and 20.00
20.00 12.00, 16.00 and 20.00

GROUPLIST(‘Parent Category:Child Category‘,’Price‘, ‘Colour‘, ‘,followed by ‘, ‘, ‘, ‘and ‘)
In this example, the field will be populated with a comma delimited list of all Price fields in each ‘Child Category’ group, sorted by ‘Price’, with ‘and ‘ replacing the comma between the second-last and last value on the list.

Price Colour GROUPLIST
12.00 Red Red, followed by Green, Yellow, Blue and Yellow
16.00 Green Red, followed by Green, Yellow, Blue and Yellow
20.00 Yellow Red, followed by Green, Yellow, Blue and Yellow
24.00 Blue Red, followed by Green, Yellow, Blue and Yellow
27.50 Yellow Red, followed by Green, Yellow, Blue and Yellow

See also

DISTINCTLIST

Was this helpful?