workbook.createConditionalFilter(options)
The content in this help topic applies to SuiteScript 2.x.
Method Description |
Creates a conditional filter, which includes a selector of what to filter, a row axis and other axis, a measure and a predicate. Conditional filters can be used in pivot definitions. |
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 selector for the conditional filter. |
|
|
required |
The measure for the conditional filter. |
|
|
required |
The other axis selector for the conditional filter. |
|
|
required |
The predicate for the conditional filter. |
|
|
boolean |
required |
Indicator for a row axis filter. If set to false, the filter is a on a column axis. |
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.
// Add additional code
...
// Create a ConditionalFilter
var myConditionalFilter = workbook.createConditionalFilter({
row: true,
otherAxisSelector: myDimensionSelector,
filteredNodesSelector: myPathSelector,
measure: myMeasure,
predicate: myExpression
});
...
// Add additional code