LimitingFilter Object Members for SuiteScript Development
The LimitingFilter object enables filtering in SuiteScript workbooks by setting limits and selection criteria, essential for effective data handling.
The LimitingFilter object is pivotal in SuiteScript development, particularly in scenarios requiring data manipulation through workbook creation. This object is essential when you want to filter results in pivot tables, allowing for finer control of how data is aggregated and displayed.
What is the LimitingFilter Object?
The LimitingFilter object is utilized in the workbook module to constrain the results generated by pivot tables. It is created using the workbook.createLimitingFilter(options) function and is passed as a parameter to the workbook.createPivot(options) method. This allows developers to filter and limit data effectively while creating custom reports.
Members of the LimitingFilter Object
The LimitingFilter object contains several members, each serving a unique purpose in the filtering process. Below is a detailed overview of its members:
| Member Name | Type | Supported Script Types | Description |
|---|---|---|---|
LimitingFilter.filteredNodesSelector | workbook.PathSelector or workbook.DimensionSelector | Server scripts | Defines the specific criteria to filter selected nodes. |
LimitingFilter.limit | number | Server scripts | Sets the maximum number of records returned by the filter. |
LimitingFilter.row | boolean | Server scripts | Indicates whether the filter operates on row axes. |
LimitingFilter.sortBys | Array<workbook.SortByDataDimensionItem> or Array<workbook.SortByMeasure> | Server scripts | Specifies the sorting order for the filtered results. |
Example Syntax
The following code snippet demonstrates how to create a LimitingFilter object:
1// Creating a limiting filter object2var myLimitingFilter = workbook.createLimitingFilter({3 row: true,4 sortBys: [myMeasureSort],5 limit: 12,6 filteredNodesSelector: myDimensionSelector7});In this example, the limiting filter is set to allow a maximum of 12 records, with results sorted based on specified measurement criteria.
Error Handling
When working with LimitingFilter, be aware of potential error codes that may occur:
WRONG_PARAMETER_TYPE: This error is thrown if an invalid type is passed for thefilteredNodesSelectorproperty. Ensure it matches eitherworkbook.PathSelectororworkbook.DimensionSelector.
By incorporating LimitingFilter objects, SuiteScript developers can significantly enhance the capabilities of their data presentations, making it easier to work with large datasets by focusing on relevant information.
Key Considerations
- The
workbook.createLimitingFilterfunction requires familiarity with defining and limiting data selections. - Proper parameter types must be adhered to, ensuring the script runs without error.
This approach not only optimizes performance but also improves the user experience when interacting with data reports.
Frequently Asked Questions (4)
Does the LimitingFilter object apply to both SuiteScript client and server scripts?
What happens if I pass an incorrect type to the filteredNodesSelector property in a LimitingFilter object?
Do I need to configure anything before using LimitingFilter with pivot tables?
Can the LimitingFilter object be used to sort results in a pivot table?
Was this article helpful?
More in General
- Payment Date Prediction Feature in NetSuite
Payment Date Prediction in NetSuite utilizes machine learning to enhance financial planning by predicting invoice payment dates.
- NetSuite Ship Central Enhancements for Packing & Shipping
NetSuite Ship Central features enhance packing and shipping operations for improved efficiency and accuracy.
- New Role Setup for NetSuite AI Connector Service in 2026.1
The 2026.1 release adds a new role requirement for the NetSuite AI Connector Service, streamlining custom tool development.
- Generative AI Features in NetSuite 2026.1
Discover new generative AI features in NetSuite 2026.1, enhancing reporting, search, predictions, and development productivity.
Advertising
Reach General Professionals
Put your product in front of NetSuite experts who work with General every day.
Sponsor This Category