Date Posted:
Product: TIBCO Spotfire®
Product: TIBCO Spotfire®
Problem:
How to set ALL Values as a filter for a given column using Web Player JavaScript API.
Solution:
Sample implementation on how to set the "All Values" filter from Web Player JavaScript API
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.htm
Below 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); }https://docs.tibco.com/pub/sfire_dev/area/doc/api/TIB_sfire_Web_Player_JavaScript_API_Reference/html/M_spotfire_webPlayer_Filtering_setFilters.htm
https://docs.tibco.com/pub/sfire_dev/area/doc/api/TIB_sfire_Web_Player_JavaScript_API_Reference/html/T_spotfire_webPlayer_filteringOperation.htm
Comments
0 comments
Article is closed for comments.