Dataset.getExpressionFromColumn(options)

Note:

The content in this help topic applies to SuiteScript 2.x.

Method Description

Returns an expression which can be used in workbook.

Returns

workbook.Expression

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

None

Module

N/dataset Module

Parent Object

dataset.Dataset

Sibling Object Members

Dataset Object Members

Since

2020.2

Parameters

Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.columnId

number

required if options.alias is not specified

The ID of the column.

options.alias

string

required if options.columnId is not specified

The alias of the column.

Errors

Error Code

Thrown If

MUTUALLY_EXCLUSIVE_ARGUMENTS

Both the options.columnID and the options.alias parameters are specified.

NEITHER_ARGUMENT_DEFINED

Neither the options.columnID or the options.alias parameter is specified.

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/dataset Module Script Samples.

            // Add additional code
...
// Load a dataset that includes a column that has an expression
var myDataset = dataset.load({
    id: 'stddataset_mydataset'    // Replace with a valid ID value for your account
});
var myWorkbookExpressionId = myDataset.getExpressionFromColumn({
    columnId: 15
});
var myWorkbookExpressionAlias = myDataset.getExpressionFromColumn({
    columnId: 16
    alias: 'myExpression'
});

log.debug({
    title: "myWorkbookExpression: ",
    details: myWorkbookExpression
});

...
// Add additional code 

          

Related Topics

dataset.Dataset
N/dataset Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices