Column.alias
Property Description |
An alias for this column. An alias is an alternate name for a column, and the alias is used in mapped results. In general, the alias is an optional property. If you want to use mapped results in your script, the alias is required. To use mapped results, you must specify an alias in the following situations:
This property is set when Query.createColumn(options) or Component.createColumn(options) is executed. |
Type |
string |
Module |
|
Parent Object |
|
Sibling Object Members |
|
Since |
2019.2 |
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 myAliasColumn = myTransactionQuery.createColumn({
fieldId: 'amount',
aggregate: query.Aggregate.AVERAGE,
alias: 'sunkcostamount'
});
myTransactionQuery.columns = [myAliasColumn];
var theAlias = myAliasColumn.alias;
...
// Add additional code