Column.aggregate
Property Description |
An aggregate function that is performed on the query result column. An aggregate function performs a calculation on the column values and returns a single value. This property is set when Query.createColumn(options) or Component.createColumn(options) is executed. For a list of supported aggregate functions, see the query.Aggregate enum. |
Type |
string (read-only) |
Module |
|
Parent Object |
|
Sibling Object Members |
|
Since |
2018.1 |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/query Module Script Samples.
// Add additional code
...
var myTransactionQuery = query.create({
type: query.Type.TRANSACTION
});
var myAggColumn = myTransactionQuery.createColumn({
fieldId: 'amount',
aggregate: query.Aggregate.AVERAGE
});
myTransactionQuery.columns = [myAggColumn];
var theAggregate = myAggColumn.aggregate;
...
// Add additional code