Conditional Format Rule Members in SuiteScript
The ConditionalFormatRule object in SuiteScript defines properties for conditional formatting in spreadsheets, enhancing data visibility.
The ConditionalFormatRule object in SuiteScript offers a way to manage conditional formatting within a workbook. This enables developers to define specific formatting rules for spreadsheet data, ensuring better data representation and visibility.
What Are ConditionalFormatRule Object Members?
The ConditionalFormatRule object contains essential properties that define how data is formatted based on specific conditions. Here are its primary members:
| Member Name | Type | Description |
|---|---|---|
filter | workbook.TableColumnFilter | Determines which rows or cells to apply the conditional format to. |
style | workbook.Style | Specifies the style to be applied as the conditional format. |
Creating a Conditional Format Rule
Developers can utilize the workbook.createConditionalFormatRule(options) method to create an instance of this object. It is often used as a parameter in the workbook.createConditionalFormat(options) method.
Supported Script Types
This object is compatible with server scripts, allowing for broader application in SuiteScript functionalities.
Error Handling
When dealing with the ConditionalFormatRule members, you may encounter the following error code:
WRONG_PARAMETER_TYPE: This error is thrown if the value specified for thefilterproperty is not a validworkbook.TableColumnFilterobject.
Additional Resources
For further information, refer to the N/workbook Module documentation and familiarize yourself with the SuiteScript 2.x Script Types.
Key Takeaways
- The ConditionalFormatRule object is crucial for implementing dynamic formatting in workbooks.
- It includes properties like
filterandstylethat define formatting conditions. - The object is intended for use in server scripts, enhancing automation and data presentations.
- Understanding error codes like
WRONG_PARAMETER_TYPEhelps in troubleshooting.
Frequently Asked Questions (4)
Can ConditionalFormatRule be used in both client and server scripts in SuiteScript?
How do I create a ConditionalFormatRule in SuiteScript?
What types of errors should I watch for when using ConditionalFormatRule?
What are the primary properties of a ConditionalFormatRule in SuiteScript?
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.
