Category Object Members in SuiteScript for Data Visualization
Category object members in SuiteScript facilitate data visualization, including axis settings, root dimensions, and sort definitions.
TL;DR Opening
The Category object in SuiteScript plays a crucial role in data visualization by providing essential members such as axis settings, root dimensions, and sort definitions. This article delves into these components, their respective types, and how they can be utilized in scripts.
What Are Category Object Members?
Category object members in SuiteScript allow developers to customize data visualization aspects within workbooks. Understanding these members provides a foundational knowledge for efficiently using the N/workbook module in SuiteScript.
Category Object Members Overview
The following table summarizes the available members of the Category object:
| Member Name | Return Type/Value Type | Supported Script Types | Description |
|---|---|---|---|
Category.axis | workbook.ChartAxis | Server scripts | The axis of the category. |
Category.root | workbook.DataDimension or workbook.Section | Server scripts | The section or data dimension for the x-axis. |
Category.sortDefinitions | workbook.SortDefinition[] | Server scripts | The sort definitions of the category. |
Individual Member Details
1. Category.axis
The Category.axis member represents the axis of the category in a chart. This is essential for structuring how data is displayed. If an incorrect parameter type is specified, it throws the error code WRONG_PARAMETER_TYPE.
2. Category.root
This member outlines the primary section or data dimension associated with the x-axis. It can either be a data dimension or a section.
3. Category.sortDefinitions
This array holds the definitions used for sorting category data, allowing for customized data views based on specific criteria.
Code Sample: Using Category Members
To illustrate the application of category members in SuiteScript, consider the following code snippet:
1// Load a workbook2var myWorkbook = workbook.load({3 id: myWorkbookId4});5 6// Access the category axis7log.audit({8 title: 'Category.axis = ',9 details: myWorkbook.charts[0].category.axis10});This code demonstrates how to load a workbook and access the category axis for logging. For a complete script example, refer to the N/workbook Module Script Samples.
Who This Affects
The following roles may benefit from understanding the Category object members:
- SuiteScript Developers: For building and customizing reports and visualizations.
- Business Analysts: To analyze and interpret data within suite charts.
Key Takeaways
- The Category object provides critical members for data visualization in SuiteScript.
- Understanding these members is essential for creating effective data visualizations.
- The
N/workbookmodule facilitates rich data representation and analysis through SuiteScript.
Frequently Asked Questions (4)
What script types support the Category object members in SuiteScript?
What error is thrown if an incorrect parameter type is specified for the Category.axis member?
How can I log the Category.axis value in a SuiteScript?
Can the Category.root member be a data dimension or a section in SuiteScript?
Was this article helpful?
More in Projects
- Field Service Management Enhancements in NetSuite
Discover recent enhancements to Field Service Management in NetSuite, including improved scheduling and real-time data access.
- Program Feature Enhancements in NetSuite 2026.1
NetSuite 2026.1 introduces key enhancements to the FSM Program feature, streamlining Case and Task automation for projects.
- NetSuite Field Service Management Feature Compatibility
NetSuite Field Service Management compatibility levels define the interaction of features with FSM functionality.
- New Project Manager Role in NetSuite 2025.2
New Project Manager role in NetSuite 2025.2 grants access to project management features with predefined permissions.
Advertising
Reach Projects Professionals
Put your product in front of NetSuite experts who work with Projects every day.
Sponsor This Category