Skip to Main Content
Spotfire Ideas Portal
Status Implemented
Product Spotfire
Categories API
Created by Guest
Created on May 16, 2019

Filtering from Spotfire api should not fail in the case of invalid values

Let’s imagine that we have 2 data sources, they have info about some items with columns: id, type and etc. 
Data source 1 contains next ids: 1,2,3,4,5,6 – my data source (3d party app)
Data source 2 contains next ids: 3, 4, 5, 7, 8, 9 – data source that Tibco Spotfire used.
set1                       set2
{1,2,3,4,5,6} and (3,4,5,7,8,9)
{ 1, 2, ( 3, 4, 5} 7, 8, 9)
both sets contain only 3,4,5 in common

When I try to filter data 
•	1 scenario (ListBox Filters):
let filterColumn = {
      dataColumnName: ‘id’,
      dataTableName: ‘dataTableName’,
      filteringSchemeName: ‘Filtering scheme’,
      filterSettings: {
           values: [3, 4, 5]  
      },
      filterType: LIST_BOX_FILTER
    }
this.spotFireApp.analysisDocuments[0].filtering.setFilter(filterColumn, spotfire.webPlayer.filteringOperation.REPLACE); (link to JS API)
As a result: it works, and on a screen I have only data with ids 3, 4, 5

•	2 scenario (ListBox Filters):

let filterColumn = {
      dataColumnName: ‘id’,
      dataTableName: ‘dataTableName’,
      filteringSchemeName: ‘Filtering scheme’,
      filterSettings: {
           values: [1, 2, 3, 4, 5]  
      },
      filterType: LIST_BOX_FILTER
    }
this.spotFireApp.analysisDocuments[0].filtering.setFilter(filterColumn, spotfire.webPlayer.filteringOperation.REPLACE); (link to JS API)
As a result: it doesn’t work, and  nothing change on a screen, looks like because I try to filter by some id that does not present in TIBCO Spotfire datasource

Instead of failing, the filter process should filter to the valid values and ignore the values that are not in the data.
Implemented in 10.0
  • ADMIN RESPONSE
    Jun 5, 2019

    This was fixed in version 10.0.

  • Attach files