Table Columns
Table columns represent columns in a table view that you create based on columns in the underlying dataset. You can apply conditional formatting rules, conditions, and sorts to table columns so they appear as you want in the table view.
For more information about table columns in SuiteAnalytics Workbook, see Workbook Table Views.
To create a table column, use workbook.createTableColumn(options). This method creates a workbook.TableColumn object. When you use this method, the datasetColumnAlias
and conditionalFormats
parameters are required.
-
The
datasetColumnAlias
parameter is the alias of a column in the underlying dataset. To ensure this value is available, specify an alias when you create each dataset column using dataset.createColumn(options). -
The
conditionalFormats
parameter is the set of conditional formatting rules to apply to the column. For more information, see Conditional Formatting Rules.
var myTableColumn = workbook.createTableColumn({
datasetColumnAlias: 'MyColumn',
conditionalFormats: [myFirstConditionalFormat, mySecondConditionalFormat]
});
Optionally, you can provide the following parameters for workbook.createTableColumn(options):
-
alias
– The alias for the table column. -
condition
– Additional conditions for the table column. -
label
– A label for the table column, which appears in the SuiteAnalytics Workbook UI. -
sort
– The sorting behavior for the table column. Use workbook.createSort(options) to create sorts. -
width
– The width of the table column in the SuiteAnalytics Workbook UI (in pixels).
var myTableColumn = workbook.createTableColumn({
alias: 'MyWorkbookTableColumn',
condition: myExtraCondition,
conditionalFormats: [myFirstConditionalFormat, mySecondConditionalFormat],
datasetColumnAlias: 'MyColumn',
label: 'My Workbook Table Column',
sort: mySort,
width: 100
});