afterServerSideSummaryCompute Event



An object that contains the summary values for all fields for which summary values were calculated. Summary values for each field can be referenced using array notation. For example, summary['QTY'].total. Each field in the summary object has the following properties:

Fields in summary are always referenced using uppercase.

The total computed for the field.


The count computed for the field.


The average computed for the field.


The minimum value for the field.


The maximum value for the field.


Fires after the server-side summary values have been computed.


The afterServerSideSummaryCompute event is triggered after the summary values for fields in the List control have been computed on the server.

A common use case for this event is to display the summary values in a control or DIV in the UX Component. For example:

// Get the total count for QTY and total cost:
var itemsOrdered = summary['QTY'].total;
var invoiceCost = summary['TOTAL'].total;

// Display values in two labels in the UX:

Server side summary calculations are only available for lists based on SQL data.

The summary value will only be available for a field if you specified that it should be computed. Summary values can be enabled on the List Builder Fields pane in the Server-side section.


Server-side Summary Values

For List controls that are based on SQL data, you can specify that summary data (e.g. total, avg, count, min and max) should be computed for certain columns in the List control. The summary computations are based on the List query (not on the rows actually visible in the List). In the case of a paginated List, there may be more rows in the query than are visible in the List. For example, the query might have 1,000,000 rows, but the list might show 20 rows at a time.

This video shows how a List control is configured to compute summary values, and then how the afterServerSideSummaryCompute event in the List is used to update a label on the UX component showing the summary values.

See Also