Function: a!grouping()
Determines the fields to group by in a query or in a chart that uses a record type as the source. The grouping should incorporate a record field, an alias, and an optional interval if grouping by a date.
See also: Chart Configuration Using Records, Column Chart Config, Bar Chart Config, Line Chart Config, Pie Chart Config, Measure Component, a!aggregationFields function
Name | Keyword | Types | Description |
---|---|---|---|
Field |
|
Any Type |
Reference to the record field to use in this grouping, configured using the |
Interval |
|
Text |
Function to use with grouping on this field. Only relevant for date or date & time fields. Valid values: |
Alias |
|
Text |
The short name by which the result of the grouping field can be referenced in other places in the chart configuration or |
Format Value |
|
Any Type |
Display value for the given grouping value. Only applies when the grouping is used in a chart. This parameter is evaluated once for each value returned. You can reference the unformatted result from the data source using |
Grouping
a!queryRecordType()
. This function can be used as a primary grouping or secondary grouping in a bar, column, line, or pie chart or to define the fields in a query using a!aggregationFields()
.a!grouping()
must be used inside of a!barChartConfig()
, a!columnChartConfig()
, a!lineChartConfig()
, a!pieChartConfig()
, or a!aggregationFields()
field
is a required parameter. It also must reference a field from the source record type.sort
parameter within the parent configuration function. When using a!grouping
in a query, an alias is required.interval
can only be used if the field is of type Date or Date and Time.formatValue
, the expression provided will execute for each unique value returned for the grouping. See Chart Configuration Using Records for more information on how to set up the format value and some examples.The following patterns include usage of the Grouping Component.