N/dataset Module
Use the N/dataset module to create a new dataset, load an existing dataset, list all existing datasets, or save a dataset. This module is available in server scripts only.
You can also use this module to:
-
Create columns, joins, and conditions for a dataset.
-
Use the N/query Module to delete a dataset.
-
Execute a dataset and obtain the results. This is analogous to executing a query definition using the N/query Module.
-
Use string aliasing and column labeling when using datasets. String aliasing is used to identify columns, which can be helpful when linking dataset columns to a workbook. Column labels are the string descriptions shown in the UI.
-
Save a dataset.
Datasets are the basis for all workbooks and workbook components in your account. In a dataset, you combine record type fields and criteria filters to create a query. The results of this query can be used as the source data for the workbooks you create in your account. A single dataset can be used in multiple workbooks. For more information about datasets in SuiteAnalytics, see Defining a Dataset. For more information about workbooks, see N/workbook Module.
In This Help Topic
N/dataset Module Members
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Object |
Object |
Server scripts |
A column in the dataset, which usually represents a record field. |
|
Object |
Server scripts |
A condition or set of conditions to apply to a column. |
||
Object |
Server scripts |
A representation of the entire dataset, including columns, conditions, and joins. |
||
Object |
Server scripts |
A joined record used in the dataset. |
||
Method |
Server scripts |
Creates a dataset. |
||
Server scripts |
Creates a dataset column. |
|||
Server scripts |
Creates a dataset condition (criteria). A condition is applied to a dataset column and includes an operator. |
|||
Server scripts |
Creates a dataset join. |
|||
Server scripts |
Creates a translation expression based on a Translation Collection. |
|||
Object[] |
Server scripts |
Retrieves descriptive information about a dataset, including name, description, and a list of columns or formulas with their labels and types. |
||
Object[] |
Server scripts |
Lists all existing datasets. |
||
|
Server scripts |
Returns metadata about datasets as a set of paged results. |
||
Server scripts |
Loads an existing dataset. |
Column Object Members
This object encapsulates the record fields in the dataset. Columns are equivalent to the fields you use when you build a dataset in SuiteAnalytics. For more information about datasets in SuiteAnalytics, see Custom Workbooks and Datasets.
The following members are available for a dataset.Column object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
string (read-only) |
Server scripts |
The alias of the column. |
|
string (read-only) |
Server scripts |
The ID of the record field associated with the column. |
||
string (read-only) |
Server scripts |
The formula of the column. |
||
number (read-only) |
Server Scripts |
The ID of the column. |
||
dataset.Join (read-only) |
Server scripts |
The join for the column. Used only when the column is from a joined record. |
||
string (read-only) |
Server scripts |
The label of the column. |
||
string (read-only) |
Server scripts |
The return type of the formula. |
Condition Object Members
This object encapsulates the criteria in the dataset. Conditions are equivalent to the criteria you use when you build a dataset in SuiteAnalytics. For more information about criteria used in datasets in SuiteAnalytics, see Dataset Criteria Filters.
The following members are available for a dataset.Condition object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
dataset.Condition[] (read-only) |
Server scripts |
The children of the condition (for example, subconditions AND’d or OR’d). |
|
dataset.Column (read-only) |
Server scripts |
The column on which the condition is placed. |
||
string (read-only) |
Server scripts |
The operator of the condition. |
||
string[] | number[] | boolean[] | Date[] | Object[] (read-only) |
Server scripts |
The values for the condition. |
Dataset Object Members
This object encapsulates the entire dataset. For more information about datasets in SuiteAnalytics, see Custom Workbooks and Datasets.
The following members are available for a dataset.Dataset object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Method |
Server scripts |
Returns an expression which can be used in a workbook. |
||
Server scripts |
Executes the dataset and returns the result set (the same as in N/query Module). |
|||
Server scripts |
Executes the dataset and returns the result set in paginated data form (the same as in N/query Module). |
|||
Object |
Server scripts |
Saves a dataset. |
||
Property |
Server scripts |
The columns in the dataset. |
||
Server scripts |
The condition (criteria) for the entire dataset. |
|||
string |
Server scripts |
The description of the dataset. |
||
string |
Server scripts |
The ID of the dataset. |
||
string |
Server scripts |
The name of the dataset. |
||
string |
Server scripts |
The internal ID for the base record type for the dataset. |
Join Object Members
Encapsulates a joined record used in the dataset. For more information about using joins in a dataset, see Joining Record Types in a Dataset.
The following members are available for a dataset.Join object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
string (read-only) |
Server scripts |
The ID of the field on which the join is performed. |
|
dataset.Join (read-only) |
Server scripts |
The child join, if the join is a multilevel join. |
||
string (read-only) |
Server scripts |
The internal ID for the source record type of the join. |
||
string (read-only) |
Server scripts |
The polymorphic target of the join. |