aggregate( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates an aggregation on a data collection.

The aggregate() method builds an aggregation on the specified collection and returns a WixDataAggregate object.

An aggregation enables you to perform certain calculations on your collection data, or on groups of items that you define, to retrieve meaningful summaries.

You can also add paging, filtering, and sorting preferences to your aggregation by chaining WixDataAggregate methods. The returned object contains the aggregate definition.

Finally, to run the aggregation, chain run() as the last method.

The aggregate() method runs with the following defaults that you can override:

  • skip: 0
  • limit: 50
Permissions
Read Data Items
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
dataCollectionIdstringRequired

ID of the collection to run the aggregation on.

Returns
Return Type:WixDataAggregate
Did this help?