N/workbook Module
Use the N/workbook module to create a new workbook, load an existing workbook, or list all existing workbooks.
A workbook can contain the following:
-
Pivots
-
Tables with columns, filters, and field contexts
-
Selectors
-
Sections
-
Data dimensions
-
Sorts
-
Conditional and limiting filters
-
Expressions
-
Data measures and calculated measures
Workbooks are where you analyze the results of your dataset queries using different components, such as table views. All workbooks are based on a dataset. For more information, see N/dataset Module. For more information about SuiteAnalytics workbooks and datasets, see the following topics:
In This Help Topic
N/workbook Module Members
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Object |
Object |
Server scripts |
A calculated measure. |
|
Object |
Server scripts |
A selector for child nodes. |
||
Object |
Server scripts |
A color. |
||
Object |
Server scripts |
A conditional filter. |
||
Object |
Server scripts |
A conditional format. |
||
Object |
Server scripts |
A conditional format rule. |
||
Object |
Server scripts |
A currency amount and currency type. |
||
Object |
Server scripts |
A data dimension. |
||
Object |
Server scripts |
A data dimension item. |
||
Object |
Server scripts |
The value of a data dimension item. |
||
Object |
Server scripts |
The value of a data dimension. |
||
Object |
Server scripts |
A data measure. |
||
Object |
Server scripts |
A selector for descendant or self nodes. |
||
Object |
Server scripts |
A dimension selector. |
||
Object |
Server scripts |
A dimension sort. |
||
Object |
Server scripts |
A duration. |
||
Object |
Server scripts |
An expression. |
||
Object |
Server scripts |
A field context. |
||
Object |
Server scripts |
A font size. |
||
Object |
Server scripts |
A limiting filter. |
||
Object |
Server scripts |
A measure. |
||
Object |
Server scripts |
A measure selector. |
||
Object |
Server scripts |
A measure sort. |
||
Object |
Server scripts |
A measure value. |
||
Object |
Server scripts |
A measure value selector. |
||
Object |
Server scripts |
A path selector. |
||
Object |
Server scripts |
A pivot axis. |
||
Object |
Server scripts |
A pivot definition. A pivot is a workbook component that enables you to pivot your dataset query results by defining measures and dimensions, so that you can analyze different subsets of data. |
||
Object |
Server scripts |
A pivot intersection. |
||
Object |
Server scripts |
A position defined by percentages of the x and y axes. |
||
Object |
Server scripts |
A position defined by units. |
||
Object |
Server scripts |
A position defined by horizontal and vertical position values. |
||
Object |
Server scripts |
A date or date-time range. |
||
Object |
Server scripts |
A record. |
||
Object |
Server scripts |
A record key. |
||
Object |
Server scripts |
A report style. |
||
Object |
Server scripts |
A report style rule. |
||
Object |
Server scripts |
A workbook section. |
||
Object |
Server scripts |
A section value. |
||
Object |
Server scripts |
A sort. |
||
Object |
Server scripts |
A sort based on a data dimension item. |
||
Object |
Server scripts |
A sort based on a measure. |
||
Object |
Server scripts |
A sort definition. |
||
Object |
Server scripts |
A style. |
||
Object |
Server scripts |
A table column. |
||
Object |
Server scripts |
A table column filter. |
||
Object |
Server scripts |
A workbook. Workbooks are where you analyze the results of your dataset queries using different components, such as table views and pivots. All workbooks are based on a dataset, and a single dataset can be used as the basis for multiple workbooks. |
||
Method |
Server scripts |
Creates a workbook. Workbooks are where you analyze the results of your dataset queries using different components, such as table views and pivots. All workbooks are based on a dataset, and a single dataset can be used as the basis for multiple workbooks. |
||
Server scripts |
Creates a calculated measure. |
|||
Server scripts |
Creates a color. |
|||
Server scripts |
Creates a conditional filter. |
|||
Server scripts |
Creates a conditional format. |
|||
Server scripts |
Creates a conditional format rule. |
|||
Server scripts |
Creates a constant expression. |
|||
Server scripts |
Creates a data dimension. |
|||
Server scripts |
Creates a data dimension item. |
|||
Server scripts |
Creates a data measure. |
|||
Server scripts |
Creates a dimension selector. |
|||
Server scripts |
Creates a dimension sort. |
|||
Server scripts |
Creates an expression. |
|||
Server scripts |
Creates a field context for table column. |
|||
Server scripts |
Creates a font size. |
|||
Server scripts |
Creates a limiting filter. |
|||
Server scripts |
Creates a measure. |
|||
Server scripts |
Creates a measure selector. |
|||
Server scripts |
Creates a measure sort. |
|||
Server scripts |
Creates a measure value selector. |
|||
Server scripts |
Creates a path selector. |
|||
Server scripts |
Creates a pivot axis. |
|||
Server scripts |
Creates a pivot definition. A pivot is a workbook component that enables you to pivot your dataset query results by defining measures and dimensions, so that you can analyze different subsets of data. |
|||
Server scripts |
Creates a position defined by percentages of the x and y axes. |
|||
Server scripts |
Creates a position defined by units. |
|||
Server scripts |
Creates a position defined by horizontal and vertical position values. |
|||
Server scripts |
Creates a report style. |
|||
Server scripts |
Creates a report style rule. |
|||
Server scripts |
Creates a section. |
|||
Server scripts |
Creates a sort. |
|||
Server scripts |
Creates a sort based on a data dimension item. |
|||
Server scripts |
Creates a sort based on a measure. |
|||
Server scripts |
Creates a sort definition. |
|||
Server scripts |
Creates a style. |
|||
Server scripts |
Creates a table view. |
|||
Server scripts |
Creates a table column. |
|||
Server scripts |
Creates a table filter. |
|||
Object[] |
Server scripts |
Lists all existing workbooks. |
||
Server scripts |
Loads an existing workbook. |
|||
Enum |
enum |
Server scripts |
Holds string values for workbook aggregation types. |
|
enum |
Server scripts |
Holds string values for colors. |
||
enum |
Server scripts |
Holds string values for workbook constant types. |
||
enum |
Server scripts |
Holds string values for workbook date-time hierarchy types. |
||
enum |
Server scripts |
Holds string values for workbook date-time property types. |
||
enum |
Server scripts |
Holds string values for workbook expression types. |
||
enum |
Server scripts |
Holds string values for font sizes. |
||
enum |
Server scripts |
Holds string values for font styles. |
||
enum |
Server scripts |
Holds string values for font weights. |
||
enum |
Server scripts |
Holds string values for images you can use in workbooks. |
||
enum |
Server scripts |
Holds string values for positions. |
||
enum |
Server scripts |
Holds string values for temporal units, such as hours and minutes. |
||
enum |
Server scripts |
Holds string values for text alignments. |
||
enum |
Server scripts |
Holds string values for text decoration line types, such as underline and strikethrough. |
||
enum |
Server scripts |
Holds string values for text decoration line styles, such as solid and dashed. |
||
enum |
Server scripts |
Holds string values for predefined total line formats. |
||
enum |
Server scripts |
Holds string values for units of measurement. |
CalculatedMeasure Object Members
The following members are available for a workbook.CalculatedMeasure object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The expression for the calculated measure. |
||
string | workbook.Expression |
Server scripts |
The label of the calculated measure. |
Color Object Members
The following members are available for a workbook.Color object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
number |
Server scripts |
The opacity, or transparency, of the color. |
|
number |
Server scripts |
The blue portion of the color. |
||
number |
Server scripts |
The green portion of the color. |
||
number |
Server scripts |
The red portion of the color. |
ConditionalFilter Object Members
The following members are available for a workbook.ConditionalFilter object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The selected filters. |
||
Server scripts |
The measure of the filter. |
|||
Server scripts |
The filter selector for the other axis. |
|||
Server scripts |
The actual predicate which indicates if the condition is met. |
|||
boolean |
Server scripts |
The row axis indicator. |
ConditionalFormat Object Members
The following members are available for a workbook.ConditionalFormat object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The conditional formatting rules that are included in the conditional format. |
ConditionalFormatRule Object Members
The following members are available for a workbook.ConditionalFormatRule object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The filter that determines which rows or cells to apply the conditional format to. |
||
Server scripts |
The style to apply as the conditional format. |
Currency Object Members
The following members are available for a workbook.Currency object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
number |
Server scripts |
The amount of the currency. |
|
string |
Server scripts |
The ID of the currency (for example, USD, EUR, GBP, and so on). |
DataDimension Object Members
The following members are available for a workbook.DataDimension object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Array<workbook.DataDimension | workbook.Section> |
Server scripts |
The children of the data dimension. |
|
Server scripts |
The items of the data dimension. |
|||
string |
Server scripts |
The formatting option for the total line. Set this value using workbook.TotalLine. |
DataDimensionItem Object Members
The following members are available for a workbook.DataDimensionItem object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The expression of data dimension item. |
||
string |
Server scripts |
The label of the data dimension item. |
DataDimensionItemValue Object Members
The following members are available for a workbook.DataDimensionItemValue object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The data dimension item. |
||
string | number | Boolean | workbook.Record | workbook.Currency | workbook.Range | workbook.Duration |
Server scripts |
The value of the data dimension item. |
DataDimensionValue Object Members
The following members are available for a workbook.DataDimensionValue object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The data dimension. |
||
Server scripts |
The item values for the data dimension. |
DataMeasure Object Members
The following members are available for a workbook.DataMeasure object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
string |
Server scripts |
The aggregation of the data measure. |
|
Server scripts |
The expression for the data measure. This property is used if the data measure is a single-expression measure. |
|||
Server scripts |
The expressions for the data measure. This property is used if the data measure is a multiple-expression measure. |
|||
string | workbook.Expression |
Server scripts |
The label of the data measure. |
DimensionSelector Object Members
The following members are available for a workbook.DimensionSelector object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The dimension of the dimension selector. |
DimensionSort Object Members
The following members are available for a workbook.DimensionSort object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The item of the dimension sort. |
||
Server scripts |
The sort of the dimension sort. |
Duration Object Members
The following members are available for a workbook.Duration object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
number |
Server scripts |
The amount of the duration. |
|
Object |
Server scripts |
The units of the duration. |
Expression Object Members
The following members are available for a workbook.Expression object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
string |
Server scripts |
The ID of the function used in the expression. |
|
Object |
Server scripts |
The parameters of the expression. |
FieldContext Object Members
The following members are available for a workbook.FieldContext object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
string |
Server scripts |
The name of the field context (for example, DISPLAY or CONSOLIDATED) |
|
Object |
Server scripts |
The parameters of the field context. |
FontSize Object Members
The following members are available for a workbook.FontSize object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
number |
Server scripts |
The numeric size of the font size. |
|
string |
Server scripts |
The unit of the font size. |
LimitingFilter Object Members
The following members are available for a workbook.LimitingFilter object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The selected filter. |
||
number |
Server scripts |
The limit number for the filter. |
||
boolean |
Server scripts |
The row axis indicator for the filter. |
||
Server scripts |
The ordering elements of the filter. |
Measure Object Members
The following members are available for a workbook.Measure object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The aggregation of the measure. |
||
Server scripts |
The expression for the measure. Only used if this is a single expression measure. |
|||
Server scripts |
The set of expressions for the measure. Only used if this is a multi expression measure. |
|||
string |
Server scripts |
The label of the measure. |
MeasureSelector Object Members
The following members are available for a workbook.MeasureSelector object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The measures for the measure selector. |
MeasureSort Object Members
The following members are available for a workbook.MeasureSort object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The measure of the measure sort. |
||
Server scripts |
The selector for the other axis (row or column that is not the main axis). |
|||
Server scripts |
The sort object for the measure sort. |
MeasureValue Object Members
The following members are available for a workbook.MeasureValue object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The measure to use for the measure value. |
||
string | number | Boolean | workbook.Record | workbook.Currency | workbook.Range | workbook.Duration |
Server scripts |
The value to use for the measure value. |
MeasureValueSelector Object Members
The following members are available for a workbook.MeasureValueSelector object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
workbook.DimensionSelector | workbook.PathSelector | workbook.DescendantorSelfNodesSelector |
Server scripts |
The column selector. |
|
Server scripts |
The measure selectors. |
|||
workbook.DimensionSelector | workbook.PathSelector | workbook.DescendantorSelfNodesSelector |
Server scripts |
The row selector. |
PathSelector Object Members
The following members are available for a workbook.PathSelector object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The elements denoting 'xpath' of the selector. |
PivotAxis Object Members
The following members are available for a workbook.PivotAxis object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The data for the pivot axis. |
||
Server scripts |
The sort definitions of the pivot axis. |
Pivot Object Members
The following members are available for a workbook.Pivot object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The limiting and conditional filters of the pivot definition. |
||
Server scripts |
The column axis of the pivot definition. |
|||
Server scripts |
The underlying dataset of the pivot definition. |
|||
Server scripts |
The filter expressions of the pivot definition. |
|||
string |
Server scripts |
The ID of the pivot definition. |
||
string |
Server scripts |
The name of the pivot definition. |
||
Server scripts |
The row axis of the pivot definition. |
PivotIntersection Object Members
The following members are available for a workbook.PivotIntersection object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The column dimension value. |
||
Server scripts |
The measure values in the pivot intersection. |
|||
Server scripts |
The row dimension value. |
PositionPercent Object Members
The following members are available for a workbook.PositionPercent object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
number |
Server scripts |
The percentage of the x dimension. |
|
number |
Server scripts |
The percentage of the y dimension. |
PositionUnits Object Members
The following members are available for a workbook.PositionUnits object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
string |
Server scripts |
The units for the position. |
|
number |
Server scripts |
The x value of the position. |
||
number |
Server scripts |
The y value of the position. |
PositionValues Object Members
The following members are available for a workbook.PositionValues object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
string |
Server scripts |
The horizontal value of the position. |
|
string |
Server scripts |
The vertical value of the position. |
Range Object Members
The following members are available for a workbook.Range object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
string |
Server scripts |
The end date or date-time of the range. |
|
string |
Server scripts |
The start date or date-time of the range. |
Record Object Members
The following members are available for a workbook.Record object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
string |
Server scripts |
The name of the record type for the record. |
|
number |
Server scripts |
The primary key of the record. |
||
Object |
Server scripts |
The properties of the record. |
RecordKey Object Members
The following members are available for a workbook.RecordKey object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Object |
Server scripts |
The properties of the record key. |
ReportStyle Object Members
The following members are available for a workbook.ReportStyle object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The formatting rules for the report style. |
||
Server scripts |
The selectors for the report style. |
ReportStyleRule Object Members
The following members are available for a workbook.ReportStyleRule object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
A Boolean expression indicating whether the style should be applied. |
||
Server scripts |
The style to be applied. |
Section Object Members
The following members are available for a workbook.Section object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Array<workbook.Measure | workbook.DataDimension | workbook.DataDimensionItem> |
Server scripts |
The children of the section. |
|
string |
Server scripts |
The formatting option for the total line. Set this value using workbook.TotalLine. |
SectionValue Object Members
The following members are available for a workbook.SectionValue object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The section of the section value. |
Sort Object Members
The following members are available for a workbook.Sort object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
boolean |
Server scripts |
When set to true, indicates the sort is in ascending order. |
|
boolean |
Server scripts |
When set to true, indicates the sort is case sensitive. |
||
query.SortLocale (read-only) |
Server scripts |
The locale of the sort. |
||
boolean |
Server scripts |
When set to true, indicates that nulls are placed last in the sort. |
SortDefinition Object Members
The following members are available for a workbook.SortDefinition object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The selector for the sort definition. |
||
Server scripts |
The sort order for the sort definition. |
SortByDataDimensionItem Object Members
The following members are available for a workbook.SortByDataDimensionItem object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The data dimension item to use for the sort. |
||
Server scripts |
The sort to use. |
SortByMeasure Object Members
The following members are available for a workbook.SortByMeasure object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The measure for the sort. |
||
workbook.DescendantorSelfNodesSelector | workbook.PathSelector | workbook.DimensionSelector |
Server scripts |
The selector for the axis that is not defined in the associated sort definition. |
||
Server scripts |
The sort to use. |
Style Object Members
The following members are available for a workbook.Style object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
string | workbook.Color |
Server scripts |
The background color of the style. |
|
string |
Server scripts |
The background image of the style. |
||
workbook.PositionPercent | workbook.PositionUnits | workbook.PositionValues |
Server scripts |
The background position of the style. |
||
string | workbook.Color |
Server scripts |
The color of the style. |
||
string | workbook.FontSize |
Server scripts |
The font size of the style. |
||
string |
Server scripts |
The font style of the style. |
||
string |
Server scripts |
The font weight of the style. |
||
string |
Server scripts |
The text alignment of the style. |
||
string | workbook.Color |
Server scripts |
The text decoration color of the style. |
||
string |
Server scripts |
The text decoration line of the style. |
||
string |
Server scripts |
The text decoration style of the style. |
Table Object Members
The following members are available for a workbook.Table object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
The columns in the table view. |
||
Server scripts |
The dataset for the table view. |
|||
string |
Server scripts |
The ID of the table view. |
||
string | workbook.Expression |
Server scripts |
The label of the table view. |
TableColumn Object Members
The following members are available for a workbook.TableColumn object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
string |
Server scripts |
The alias for the table column. |
|
string |
Server scripts |
The alias of the dataset column from which the table column was created. |
||
number |
Server scripts |
The ID of the dataset column from which the table column was created. |
||
Server scripts |
The field context for the field used in the table column. |
|||
Server scripts |
The filters for the table column. |
|||
string |
Server scripts |
The label for the table column. |
||
Server scripts |
The sort for the table column. |
|||
number |
Server scripts |
The desired width of the table column when displayed in the UI. |
TableColumnFilter Object Members
The following members are available for a workbook.TableColumnFilter object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
string |
Server scripts |
The operator for the table column filter. |
|
Array<null | Object | Boolean | number | string | Date> |
Server scripts |
The values for the table column filter. |
Workbook Object Members
The following members are available for a workbook.Workbook object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Method |
Server scripts |
Runs a pivot in the workbook and returns the results as a set of row-column intersections. |
||
Property |
string |
Server scripts |
The description of the workbook. |
|
string |
Server scripts |
The ID of the workbook. |
||
string |
Server scripts |
The name of the workbook. |
||
Server scripts |
The pivots in the workbook. |
|||
Server scripts |
The tables in the workbook. |