Column.aggregate

Note:

The content in this help topic pertains to SuiteScript 2.0.

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

N/query Module

Parent Object

query.Column

Sibling Object Members

Column Object Members

Since

2018.1

Syntax

Important:

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 

          

Related Topics

query.Query
N/query Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices