Google is committed to advancing racial equity for Black communities. See how.

Class DataSourceTableFilter

DataSourceTableFilter

Access and modify an existing data source table filter. To create a new data source table filter, use DataSourceTable.addFilter(columnName, filterCriteria).

Methods

MethodReturn typeBrief description
getDataSourceColumn()DataSourceColumnReturns the data source column this filter applies to.
getDataSourceTable()DataSourceTableReturns the DataSourceTable that this filter belongs to.
getFilterCriteria()FilterCriteriaReturns the filter criteria for this filter.
remove()voidRemoves this filter from the data source object.
setFilterCriteria(filterCriteria)DataSourceTableFilterSets the filter criteria for this filter.

Detailed documentation

getDataSourceColumn()

Returns the data source column this filter applies to.

Return

DataSourceColumn — The data source column.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getDataSourceTable()

Returns the DataSourceTable that this filter belongs to.

Return

DataSourceTable — The data source table, to which this filter belongs.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getFilterCriteria()

Returns the filter criteria for this filter.

Return

FilterCriteria — The filter criteria for this filter.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

remove()

Removes this filter from the data source object.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

setFilterCriteria(filterCriteria)

Sets the filter criteria for this filter.

Parameters

NameTypeDescription
filterCriteriaFilterCriteriaThe filter criteria to set.

Return

DataSourceTableFilter — The filter for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets