1 Reply Latest reply on Jan 30, 2018 6:15 AM by lenaic.ridinger

    Need Tableau Javascript API for Pause/Resume and Refresh button


      I am looking for Tableau Javascript API to implement Pause/Resume and Refresh option being provided in Tableau server. I want to implement an 'Apply Filter' button on an HTML page that would get all the multiple filter values (such as Category, Region etc.) from several quick filters and refresh the Tableau Viz at one go rather than refreshing the Viz every time user selects values from a single filter. Any help would be appreciated.

        • 1. Re: Need Tableau Javascript API for Pause/Resume and Refresh button

          Hi Swapnil,


          I have moved your thread to the Javascript category


          In the meantime, except during viz initialization, the API can only update one filter per call to applyFilterAsync.

          However, you can just call applyFilterAsync multiple times.


          From Daniel Alvarez Vera:

          Step 1: When you click on a filter save its name

          Step 2: On submit loop over your saved names and call the function (applyFiltersAsync with the corresponding name)


          Sample code could be

          var savedFilters = []; 

          function filterClicked (filtername) { 


          function onSubmit() { 

          for(var i = 0; i < savedFilters.length; i++) { 

                    applyFiltersAsync(savedFilters[i], ...) 



          You can also learn more here: Tableau JavaScript API Concepts--Filtering




          Lénaïc RIÉDINGER, Global Community Engineer Tableau

          Tableau Community Forums | Knowledge Base

          If you see a Helpful or Correct response, please mark it thanks to the buttons below the targeted post!