Interface: GlobalFiltersAPI

GlobalFiltersAPI

API class that is used to control global filters.

Example

dashboard.getFeature('GlobalFilters')

Methods

clearFilters(selectors, transactionTokenopt) → {boolean}

Clears all existing filter values from the dashboard matching the given selectors.

Parameters:
Name Type Attributes Description
selectors Object

Object describing the filters to clear of values

transactionToken TransactionToken <optional>

Transaction token

Returns:

Returns true if any filter values were successfully cleared.

Type
boolean
Example
filterApi.clearFilters({
    scope: 'model0000016428911c88_00000001' // single tab
}, transactionToken);

getFilters(source, scopeopt) → {FilterAPI}

Gets a FilterAPI from the specified context.

Parameters:
Name Type Attributes Default Description
source String

Datasource ID; defaults to the first datasource.

scope String <optional>
global

Defaults to 'global', i.e. "all tabs". Provide a page ID for "this tab".

Returns:
Type
FilterAPI

removeFilters(selectors, transactionTokenopt, optionsopt) → {boolean}

Removes all existing filters from the dashboard matching the given selectors.

Parameters:
Name Type Attributes Description
selectors Object

Object describing the filters to remove. If not specified, all filters will be removed.

transactionToken TransactionToken <optional>

Transaction token

options Object <optional>
Returns:

Returns true if any filters were successfully removed.

Type
boolean
Example
filterApi.removeFilters({
    scope: 'global' // all tabs
}, transactionToken);