workbook.createTableColumnFilter(options)
Method Description |
Creates a table column filter, which includes an operator and values. |
Returns |
|
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Sibling Module Members |
|
Since |
2020.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
---|---|---|---|
|
string |
required |
The operator for the filter. Values correspond to those in query.Operator. For instance, you can use the string value ‘EMPTY’, which corresponds to query.Operator.EMPTY. |
|
Array<null | Object | number | string | boolean | Date> |
optional |
The values for the filter. The values are specified based on the table column the filter is being placed on and the |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/workbook Module Script Samples. Also see Full scripts in the Tutorial: Creating a Workbook Using the Workbook API topic.
// Add additional code
...
// Create a TableFilter without values
var myTableFilter = workbook.createTableFilter({
operator: query.Operator.EMPTY
});
// Create a TableFilter with values
var myValues = ['value1', 'value2', 'value3'];
var myTableFilter = workbook.createTableFilter({
operator: query.Operator.ANY_OF,
values: [myValues]
});
...
// Add additional code