workbook.createMeasureSort(options)
Method Description |
Creates a measure sort, which defines a sort on a measure. |
Returns |
|
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Sibling Module Members |
|
Since |
2020.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
---|---|---|---|
|
required |
The measure for the measure sort. |
|
|
required |
The selector for the other axis of the measure sort. |
|
|
required |
The selector of the measure sort. This corresponds to the MeasureSort.sort property. |
|
|
required |
The sort for the measure sort. |
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
...
// Create a DimensionSelector-DimensionSelector MeasureSort
var myMeasureSort = workbook.createMeasureSort({
measure: myMeasure,
selector: myDimensionSelector,
otherAxisSelector: myOtherDimensionSelector,
sort: mySort
});
// Create a PathSelector-PathSelector MeasureSort
var myMeasureSort = workbook.createMeasureSort({
measure: myMeasure,
selector: myPathSelector,
otherAxisSelector: myOtherPathSelector,
sort: mySort
});
// Create a DimensionSelector-PathSelector MeasureSort
var myMeasureSort = workbook.createMeasureSort({
measure: myMeasure,
selector: myDimensionSelector,
otherAxisSelector: myPathSelector,
sort: mySort
});
// Create a PathSelector-DimensionSelector MeasureSort
var myMeasureSort = workbook.createMeasureSort({
measure: myMeasure,
selector: myPathSelector,
otherAxisSelector: myDimensionSelector,
sort: mySort
});
// Create a DimensionSelector-AllSubNodesSelector MeasureSort
var myMeasureSort = workbook.createMeasureSort({
measure: myMeasure,
selector: myDimensionSelector,
otherAxisSelector: myAllSubNodesSelector,
sort: mySort
});
// Create a AllSubNodeSelector-DimensionSelector MeasureSort
var myMeasureSort = workbook.createMeasureSort({
measure: myMeasure,
selector: myAllSubNodesSelector,
otherAxisSelector: myDimensionSelector,
sort: mySort
});
// Create a AllSubNodeSelector-PathSelector MeasureSort
var myMeasureSort = workbook.createMeasureSort({
measure: myMeasure,
selector: myAllSubNodesSelector,
otherAxisSelector: myPathSelector,
sort: mySort
});
...
// Add additional code