10 Replies Latest reply on Jan 12, 2015 3:22 AM by sana ben ahmed

    Date Filters in Parameters or Javascript API only?

    David Henrickson

      We are using embedding with tableau 8.2.4.  We have a date selector outside of tableau, along with a few other custom filters.  The Javascript API works great for changing the filter dynamically, in particular using the range filter.

       

      The issue is having a consistent way to set this filter.  Is there a parameters syntax for this, eg. VizCreateOptions?

       

      It is clearly possible to set static filters, like Region=Northwest, or even multiple values like Region=Northwest,Southeast.

       

      But I haven't found a way or syntax to provide a date range, or >= or <= operators.  Is there a syntax for this?

       

      The two options we have tried:

       

      1. onFirstInteractive.  This works consistently and reliably.  However, as mentioned on other threads, there is a double render since the visualization comes in first without filters, or with different default filters.  Also, revert then goes back to a state prior to those filters.  I suppose we'll intercept the revert at some point.

       

      2. Parameters.  Very tedious for datetime.  Can't easily use ISO UTC datetime (have to switch to text).  Lose benefits of filters and two sets of code to maintain, since we have to use the Javascript API anyway during interactivity.

       

      Ideally there would be a way to always just use the programmatic interface to set the filters, whether initial state or later.  So either a way to create the viz without the first render, and/or be able to set the filters prior to first render to avoid the double render as well as perhaps handle the revert case.

       

      Cheers