ConditionalFilter Object Members in SuiteScript 2.1
ConditionalFilter object members enable dynamic data filtering in SuiteScript 2.1 for reports and tables.
The ConditionalFilter object is integral for managing dynamic filtering in reports and data presentations within SuiteScript 2.1. It allows developers to programmatically define filtering criteria on reports and tables, enhancing the reports' interactivity and usability.
What Is a ConditionalFilter?
A ConditionalFilter object is utilized to set various conditions under which data will be filtered. This is particularly useful when creating pivot tables or other complex data presentations in applications. The conditional filter serves as a parameter in methods like workbook.createPivot(options) and workbook.createTableColumn(options), enabling fine-grained control over the displayed data.
Members of the ConditionalFilter Object
The following table lists the members available for a workbook.ConditionalFilter object, including their return types and supported script types:
| Member Name | Return Type | Supported Script Types | Description |
|---|---|---|---|
ConditionalFilter.columnSelector | workbook.DescendantorSelfNodesSelector, workbook.PathSelector, workbook.DimensionSelector, workbook.ChildNodesSelector | Server scripts | Selector for columns to filter. |
ConditionalFilter.filteredNodesSelector | workbook.PathSelector, workbook.DimensionSelector | Server scripts | Selector for filtered nodes. |
ConditionalFilter.measure | workbook.CalculatedMeasure, workbook.DataMeasure | Server scripts | Measure used for the filter. |
ConditionalFilter.otherAxisSelector | workbook.PathSelector, workbook.DimensionSelector | Server scripts | Selector for the other axis. |
ConditionalFilter.predicate | workbook.Expression | Server scripts | Determines if the condition meets criteria. |
ConditionalFilter.row | boolean | Server scripts | Indicates the row axis. |
ConditionalFilter.rowSelector | workbook.DescendantorSelfNodesSelector, workbook.PathSelector, workbook.DimensionSelector, workbook.ChildNodesSelector | Server scripts | Selector for rows to filter. |
Syntax Example
Here is a syntax example demonstrating how to create a ConditionalFilter:
1// Add additional code2...3var myConditionalFilter = workbook.createConditionalFilter({4 filteredNodesSelector: mySelector,5 measure: myMeasure,6 otherAxisSelector: myOtherSelector,7 predicate: myPredicateExpression,8 row: true9});10...11// Add additional codeWho Should Use ConditionalFilter?
This object will benefit developers working within the SuiteScript environment, particularly those looking to enhance reporting capabilities or implement advanced data visualization techniques.
Key Points
- The ConditionalFilter object is essential for dynamic data filtering in SuiteScript.
- Members of the ConditionalFilter allow comprehensive control over filtering criteria.
- This object integrates seamlessly with reports by utilizing methods like
workbook.createPivot()andworkbook.createTableColumn().
Frequently Asked Questions (4)
Do I need to enable any feature flags to use ConditionalFilter in SuiteScript 2.1?
What script types support the ConditionalFilter object in SuiteScript 2.1?
How does the ConditionalFilter interact with the workbook.createPivot() method?
What types of selectors can be used with the ConditionalFilter rowSelector member?
Was this article helpful?
More in SuiteScript
- SuiteScript 2.1 Enhancements in NetSuite February Updates
SuiteScript 2.1 now supports async features and PATCH method. Discover the latest API and SuiteProcurement improvements.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- Binary File Support in N/https Module for SuiteScript
SuiteScript enhances capabilities with binary file support in the N/https module, allowing improved data handling in external communications.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
