访问和修改现有数据源表过滤器。如需创建新的数据源表过滤器,请使用
DataSourceTable.addFilter(columnName, filterCriteria)。
此类只能用于与数据库连接的数据。
方法
| 方法 | 返回值类型 | 简介 |
|---|---|---|
get | Data | 返回此过滤器所应用的数据源列。 |
get | Data | 返回此过滤器所属的 Data。 |
get | Filter | 返回此过滤器的过滤条件。 |
remove() | void | 从数据源对象中移除此过滤器。 |
set | Data | 设置此过滤器的过滤条件。 |
详细文档
getDataSourceColumn()
返回此过滤器所应用的数据源列。
返回
DataSourceColumn:数据源列。
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
getDataSourceTable()
返回此过滤器所属的 DataSourceTable。
返回
DataSourceTable:此过滤器所属的数据源表。
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
getFilterCriteria()
返回此过滤器的过滤条件。
返回
FilterCriteria:此过滤器的过滤条件。
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
remove()
从数据源对象中移除此过滤器。
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
setFilterCriteria(filterCriteria)
设置此过滤器的过滤条件。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
filter | Filter | 要设置的过滤条件。 |
返回
DataSourceTableFilter:用于链接的过滤器。
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets