Modules

filter

 

Objects/Functions

module (N/query)

SuiteScript 2.0

Column.aggregate

// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=Column.aggregate for more information.

N/query Module
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: N/query Module
Parent Object: query.Column
Sibling Object Members: Column Object Members
Since: 2018.1
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Column.aggregate

Example:

// Code Example 1
// 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

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_1510789115.html