workbook.ExpressionType
JavaScript does not include an enumeration type. The SuiteScript 2.x documentation uses the term enumeration (or enum) to describe a plain JavaScript object with a flat, map-like structure. In this object, each key points to a read-only string value.
Enum Description |
Holds string values for expression types. Use these values for the Make sure that you use the exact parameter names that are supported for each expression type. For example, if you create an
|
Module |
|
Sibling Module Members |
|
Since |
2020.2 |
Values
Value |
Supported Parameters |
Description |
---|---|---|
|
|
Returns The specified expressions must be boolean expressions. |
|
|
Returns |
|
|
Returns The specified expressions must be numeric expressions. |
|
|
Returns |
|
|
Returns You can specify the following relationships (as strings for
|
|
|
Creates a constant with a type of The type can often be inferred automatically, but not in all cases. For example, there is no way to distinguish between decimal values and integer values, so in this case, you must specify the type. |
|
|
Applies currency conversion on a currency expression. The exchange rate is determined by the values for source currency, target currency, and date. If the target currency is not specified, the expression uses the currency of the user’s subsidiary. If the date is not specified, the expression uses the exchange rate for the current date. |
|
— |
— |
|
|
Converts a relative date expression (as a query.RelativeDateRange value) to its corresponding date range expression. The anchor lets you specify the starting point for the relative date. If an anchor is not specified, the current date is used. |
|
|
Converts a relative date expression (as a query.RelativeDateRange value) to its corresponding date expression. The anchor lets you specify the starting point for the relative date. If an anchor is not specified, the current date is used.
|
|
|
Returns a property from the specified date/time expression. For |
|
|
Returns Both operands must be numeric expressions. |
|
|
Returns |
|
|
References a field of a certain type in the Do not create the |
|
|
Enables hierarchy for an expression.
Typically, the hierarchy value is |
|
|
Converts individual values of a hierarchy to a single string value using concatenation and the specified delimiter character. For example, if a hierarchy includes the values Typically, the hierarchy value is |
|
— |
— |
|
|
Returns
|
|
|
Returns |
|
None |
Returns the value of the current expression. You can use this function only as an argument in another expression. For example, the |
|
|
Returns an expression that holds the value of the |
|
|
Returns |
|
|
Returns |
|
|
Returns |
|
|
Returns The specified expressions must be boolean expressions. |
|
|
Returns |
|
|
Returns a display value from the specified record. The returned value and value type are based on the type of record you specify. |
|
|
Returns the record key (sometimes called the internal ID) of the specified record. |
|
|
Consolidates a currency expression based on the user’s subsidiary and the current accounting period. |
|
|
Returns the |
|
|
Returns a date/time value, and if any fields have a value that is smaller than the specified unit of time, these fields are set to zero. For example, if you use this expression type with a unit of You can specify the following units of time:
|
Syntax
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. Also see Full scripts in the Tutorial: Creating a Workbook Using the Workbook API topic.
// Add additional code
...
var myExpression = workbook.createExpression({
functionId: workbook.ExpressionType.EQUALS,
parameters: {
operand1: dataset.getExpressionFromColumn({
alias: 'salary'
}),
operand2: workbook.createConstant(10000)
}
});
// Add additional code