Conditional Format Rule Members in SuiteScript

The ConditionalFormatRule object in SuiteScript defines properties for conditional formatting in spreadsheets, enhancing data visibility.

·2 min read·View Oracle Docs

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 NameTypeDescription
filterworkbook.TableColumnFilterDetermines which rows or cells to apply the conditional format to.
styleworkbook.StyleSpecifies 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 the filter property is not a valid workbook.TableColumnFilter object.

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 filter and style that define formatting conditions.
  • The object is intended for use in server scripts, enhancing automation and data presentations.
  • Understanding error codes like WRONG_PARAMETER_TYPE helps in troubleshooting.

Source: This article is based on Oracle's official NetSuite documentation.

Frequently Asked Questions (4)

Can ConditionalFormatRule be used in both client and server scripts in SuiteScript?
The ConditionalFormatRule object is specifically compatible with server scripts in SuiteScript. It is not intended for use in client scripts.
How do I create a ConditionalFormatRule in SuiteScript?
You can create a ConditionalFormatRule by using the `workbook.createConditionalFormatRule(options)` method. It is typically used as a parameter in the `workbook.createConditionalFormat(options)` method.
What types of errors should I watch for when using ConditionalFormatRule?
A common error to watch for is the `WRONG_PARAMETER_TYPE` error, which occurs if the specified value for the `filter` property is not a valid `workbook.TableColumnFilter` object.
What are the primary properties of a ConditionalFormatRule in SuiteScript?
The primary properties of a ConditionalFormatRule are `filter`, which determines the rows or cells to apply formatting to, and `style`, which specifies the style to be applied as the conditional format.
Source: ConditionalFormatRule Object Members Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Platform

View all Platform articles →