Table Columns
Table columns are based on dataset columns and appear in your table view. You can customize table columns with formatting rules, conditions, and sorting to get the look you want.
For more information about table columns in SuiteAnalytics Workbook, see Workbook Table Views.
You can create a table column using workbook.createTableColumn(options). This method creates a workbook.TableColumn object. To create a table column, you'll need to provide the datasetColumnAlias
and conditionalFormats
parameters.
-
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 applies formatting rules to the column. For more information, see Conditional Formatting Rules.
var myTableColumn = workbook.createTableColumn({
datasetColumnAlias: 'MyColumn',
conditionalFormats: [myFirstConditionalFormat, mySecondConditionalFormat]
});
You can also provide these optional 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
});