2 Replies Latest reply on May 15, 2018 1:23 AM by A D

    JS API's applyFilterAsync seems to usually not work for one filter

    A D

      I am trying to apply date filter using applyFilterAsync, and it works only sometimes for that particular filter. Most of the time it doesn't work. But it seems like once it starts working, then it keeps working until I refresh the page.

       

      I am using it as follows:

      .applyFilterAsync("MONTH", [ "August 2016", "September 2016"], tableau.FilterUpdateType.REPLACE)

       

      getFilterAsync for that specific filter returns a structure like this:

      {

        value: 45646466767 // this is a random number just to show that it's a value representing date

        formattedValue: "August 2016"

      }

       

      I tried applying the same filter using the raw value instead of formatted one, but that never worked for me.

       

      When the aforementioned action doesn't work, the response from server is still 200, but inside the JSON, it says "BhX=invalid-filter-values". This doesn't make any sense as somtimes those filter values are accepted and not considered invalid.

       

      Also, I should mention that invoking this method for any other filter works correctly, always.

       

      Any suggestions as to what might be wrong?