Totals Component
The totals component is used put the result of aggretional operations, such count, average, and sum of the records.
INFO
The [?] indicates the argument index used in the totals function.
definitionCount
Counts the result of the given query in the given definition
args:
* [1] - definition name
* [2] - the query to execute
* [3] - additional optionsAdditional Options
For the additional options argument, if we want to add an automatic refresh to the totals count, we must add the validity like so: {"validity":10 }. This example makes the totals count refresh itself every 10 seconds automatically, instead of the user having to manually refresh the page. Change the 10 to whatever you want the refresh time to be.
domainCount
Counts the result of the given query in the given definition
args:
* [1] - domain name
* [2] - the query to executefieldSum
sums the values of the fieldName resulting from the given query in the given definition
args:
* [1] - definition name
* [2] - the field name to use to do the sum
* [3] - the query to executefieldAverage
calculates the average of the values of field fieldName of the given query in the given definition
args:
* [1] - definition name
* [2] - the field name to use to do the sum
* [3] - the query to executefieldWeightedAverage
calculates the average weight of the values of field fieldName applying the weights of weightFieldName of the given query in the given definition
args:
* [1] - definition name
* [2] - the field name to use
* [3] - the weight field name to use
* [4] - the query to execute