Grouping data

GROUPSERIESONFIELDCHANGE – Populate a numerical series incrementally

193 views June 1, 2018 admin 0

Overview

This Custom Field populates a group with a numerical series that increments each time a given field changes value.

Syntax

GROUPSERIESONFIELDCHANGE(‘GroupPath’,‘SortField’,‘FieldName’, ‘StartValue’, ‘Increment’)

GROUPSERIESONFIELDCHANGE(‘Parent Category:Child Category’,‘Price’,‘Price’, 1, 10)

Element Description
‘GroupPath’ Group path delimited by colons.
‘SortField’ The field by which to sort.
‘FieldName’ Each time the value of this field changes, the value returned by this function will be incremented.
‘StartValue’ An integer to start from.
‘Increment’ Each time the specified field changes value, the value returned by this function will be incremented by the amount specified by this parameter.

Example

GROUPSERIESONFIELDCHANGE(‘Parent Category:Child Category’, ‘Price’, ‘Price’, 1, 10)

In this example prices are displayed in ascending price order with a value of ‘1’ returned in the first two records (as the value does not change in the second record), and then increases by 10 as for each subsequent value (as the value changes with each subsequent record).

PRICE GROUPSERIESONFIELDCHANGE
5.00 1
5.00 1
10.00 11
15.00 21
17.50 31

GROUPSERIESONFIELDCHANGE(‘Parent Category:Child Category’, ‘Price’, ‘Price’, 0, 5)

In this example prices are displayed in ascending price order with a value of ‘0’ returned in the first record. ’10’ is returned for the third and fourth record as the value is the same in both.

PRICE GROUPSERIESONFIELDCHANGE
5.00 0
10.00 5
15.00 10
15.00 10
17.50 15

See also

GROUPSEQUENCE

GROUPNUMBERSEQUENCE

GROUPSEQUENCEONFIELDCHANGE

GROUPSERIES

Was this helpful?