Tyger Guzman 2 Posted December 6, 2019 Posted December 6, 2019 I'm trying to set a date range filter with the Javascript API in my mashup. But doesn't seem to work the same was as if were a text field. Any ideas how to filter a date range with Javascript API https://community.spotfire.com/wiki/how-set-filters-using-tibco-spotfirer-javascript-api https://support.tibco.com/s/article/How-to-set-ALL-Values-as-a-filter-for-a-given-column-using-Web-Player-JavaScript-API function SetFilterValues1() { var filterColumns = new Array(); filterColumns[0] = { filteringSchemeName: 'Filtering scheme', dataTableName: 'CustomQuery', dataColumnName: 'DB_LoadDate', filterSettings: { values : [ '12/02/2019', '12/03/2019'] }, filterType: 3 } //console.log(mysel); console.log(filterColumns) viewOne1.filtering.setFilters(filterColumns,2); console.log('test2'); } function SetFilterValues1() { var filterColumns = new Array(); filterColumns[0] = { filteringSchemeName: 'Filtering scheme', dataTableName: 'CustomQuery', dataColumnName: 'DB_LoadDate', filterSettings: { highValue:'12/03/2019', lowValue: '12/05/2019' } filterType: 3 } //console.log(mysel); console.log(filterColumns) viewOne0.filtering.setFilters(filterColumns,2); console.log('test2'); }
Tyger Guzman 2 Posted December 6, 2019 Author Posted December 6, 2019 I had the high & low values reversed. The blow script worked: function SetFilterValues1() { var filterColumns = new Array(); filterColumns[0] = { filteringSchemeName: 'Filtering scheme', dataTableName: 'CustomQuery', dataColumnName: 'DB_LoadDate', filterSettings: { highValue:'12/05/2019', lowValue: '12/03/2019' } } viewOne1.filtering.setFilters(filterColumns,2); }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now