CalculatedMeasure.label

Note:

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

Property Description

The label for the calculated measure.

Type

workbook.Expression | string

Module

N/workbook Module

Parent Object

workbook.CalculatedMeasure

Sibling Object Members

CalculatedMeasure Object Members

Since

2021.2

Errors

Error Code

Thrown If

WRONG_PARAMETER_TYPE

The value specified for this property is not a workbook.Expression object or a string.

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

            // Add additional code
...
var myCalculatedMeasure = workbook.createCalculatedMeasure({
    label: 'Balance',
    expression: workbook.createExpression({
        functionId: workbook.ExpressionType.MINUS,
        parameters: {
            operand1: workbook.createExpression({
                functionId: workbook.ExpressionType.MEASURE_VALUE,
                parameters: {
                    measure: myFirstDataMeasure
                }
            }),
            operand2: workbook.createExpression({
                functionId: workbook.ExpressionType.MEASURE_VALUE,
                parameters: {
                    measure: mySecondDataMeasure
                }
            })
        }
    })
});

var theLabel = myCalculatedMeasure.label;
...
// Add additional code 

          

Related Topics

N/workbook Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices