This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Refines a WixDataAggregate
to only contain the maximum value from each aggregation group.
The max()
method refines a WixDataAggregate
to contain the maximum
value from the specified field for each aggregated group or from the
whole collection if no group is defined.
When the aggregation is run()
, the returned WixDataAggregateResult
object contains an item for each group with the following key:value pairs:
projectedField
, the key is named
using that value. Otherwise, the key is named using the following format:
"fieldMax"
, where field
is the name of the specified field.The following types of fields can be compared to determine a maximum value:
"text"
is greater than "Text"
.Note: Aggregations can only be used on collections you have created. They cannot be used on Wix app collections.
Field in which to find the maximum value.
Field in the aggregation results that contains the maximum value.