book
Article ID: KB0082636
calendar_today
Updated On:
Description
Sample implementation on how to set the "All Values" filter from Web Player JavaScript API
Resolution
Implement the "filteringOperation.ADD_ALL" enumeration which does not require setting the values property in FilterSettings .
From the documentation:
ADD_ALL >> Adds all values to the filterColumn. The values property in FilterSettings must not be set.
https://docs.tibco.com/pub/sfire_dev/area/doc/api/TIB_sfire_Web_Player_JavaScript_API_Reference/html/T_spotfire_webPlayer_filteringOperation.htmBelow is a sample code snippet:
function SetAllValuesFilters() {
var filterColumns = new Array();
filterColumns[0] = {
filteringSchemeName: "Filtering scheme",
dataTableName: "World Bank Data",
dataColumnName: "Country Code",
filterSettings: {
includeEmpty: true
}
}
_analysisDocument.filtering.setFilters(filterColumns, spotfire.webPlayer.filteringOperation.ADD_ALL);
}
Issue/Introduction
How to set ALL Values as a filter for a given column using Web Player JavaScript API