Grouping Component

Function: a!grouping()

Determines the groupings for fields on a chart.

See also: Chart Configuration Using Records, Column Chart Config, Bar Chart Config, Line Chart Config, Pie Chart Config, Measure Component

Parameters

Name Keyword Type Description
Field field Any Type Reference to the record field to use in this grouping, configured using the recordType! domain. For example, recordType!Case.fields.status.
Interval interval Text Function to use with grouping on this field. Only relevant for date or date & time fields. Valid values: "YEAR", "MONTH".
Alias alias Text The short name by which the result of the grouping field can be referenced in other places of the chart configuration. Values are case-sensitive.
Format Value formatValue Any Type Display value for the given grouping value. This parameter is evaluated once for each value returned. You can reference the unformatted result from the data source using fv!value. (Note: this display value does not affect the values used in calculations for the chart; it is only used for display).

Returns

Grouping

Notes

  • This configuration is used when a record type is defined as the data source for a chart. This function can be used as a primary grouping or secondary grouping in a bar, column, line, or pie chart.
  • a!grouping() must be used inside of a!barChartConfig(), a!columnChartConfig(), a!lineChartConfig(), or a!pieChartConfig().
  • The field is required to display data on the chart. It also must reference a field used in the source record type.
  • If an alias is provided, it can be used as the field in the sort parameter within the parent configuration function.
  • The interval can only be used if the field is of type Date or Date and Time.
  • When using 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.
Open in Github Built: Fri, Sep 17, 2021 (01:42:52 PM)

On This Page

FEEDBACK