ConditionalFormat Object Members in SuiteScript
The ConditionalFormat object in SuiteScript enables dynamic formatting of workbooks using customizable rules for better data visualization.
The ConditionalFormat object in SuiteScript is essential for creating dynamic workbook visualizations through conditional formatting rules. This allows developers to enhance data presentation based on specific criteria, making reports more accessible and insightful.
What is the ConditionalFormat Object?
The ConditionalFormat object encapsulates a set of formatting rules that can be applied to workbook data. Developers commonly use this object within SuiteScript to create visually impactful analytics by applying conditions to data cells.
How to Create a ConditionalFormat Object
You can create a ConditionalFormat object using the workbook.createConditionalFormat(options) method. This method requires configuration options that specify the formatting rules to be applied.
Syntax Example
Below is a sample syntax of creating a ConditionalFormat object:
// myConditionalFormat is a workbook.ConditionalFormat objectvar myConditionalFormat = workbook.createConditionalFormat({ rules: [formatrules] // array of previously created workbook.ConditionalFormatRule});Properties of ConditionalFormat
The main property of the ConditionalFormat object is:
| Property Name | Return Type | Description |
|---|---|---|
rules | workbook.ConditionalFormatRule[] | The conditioning rules contained within the format object. |
Supported Script Types
The ConditionalFormat object is supported in server scripts, enabling back-end manipulations and data definitions for workbook presentations.
Error Handling
When utilizing the ConditionalFormat object, it's essential to handle errors effectively:
NO_RULE_DEFINED: Indicates that the rules property is an empty array, meaning no conditions are set.WRONG_PARAMETER_TYPE: This error occurs if you pass a parameter that isn't an array ofworkbook.ConditionalFormatRuleobjects.
Who This Affects
This information is crucial for:
- Developers: Who implement advanced data visualizations in SuiteScript.
- System Administrators: Responsible for maintaining workbook functionalities.
Key Takeaways
- The ConditionalFormat object allows the application of dynamic formatting rules in workbook data presentations.
- The
rulesproperty defines specific formatting conditions for data cells. - Understanding error codes is essential for debugging when working with ConditionalFormat objects.
Source: This article is based on Oracle's official NetSuite documentation.
Frequently Asked Questions (4)
Do I need a specific version of NetSuite to use the ConditionalFormat object?
What are the prerequisites for using the ConditionalFormat object in SuiteScript?
How do I handle errors when using the ConditionalFormat object?
Can ConditionalFormat objects be used in client scripts?
Was this article helpful?
More in Platform
- Style Object Members for Workbook API in NetSuite
The Style object provides customizable properties for workbook formatting in NetSuite, enhancing report and visualization functionality.
- Asynchronous HTTP Requests with SuiteScript Promises
Use SuiteScript to send asynchronous HTTP requests with promises for efficient error handling and response processing.
- Setting Sublist Field Values in SuiteScript
Set values for sublist fields in SuiteScript using the setSublistValue method. Understand required parameters and error handling.
- In This Help Topic
Explore N/log module guidelines, log levels, and script execution logs for efficient logging in SuiteScript.
Advertising
Reach Platform Professionals
Put your product in front of NetSuite experts who work with Platform every day.
Sponsor This Category