1 Reply Latest reply on Nov 26, 2018 3:38 PM by Patrick Van Der Hyde

    Multiple ApplyFilterAsync function calls are making network calls sequentially instead of simultaneous

    Martin Borugadda

      Hello All,


      I've a Tableau workbook with multiple worksheets. I need to apply a filter across these worksheets and so I'm iterating through the worksheets and calling the applyFilterAsync function on each one of them. I'm logging a message to the console each time this function is called and I could see that applyFilterAsync is called on all the worksheets very fast.



      for (var ws of dashboard.getWorksheets()) {

           console.log('Applying filter.');

           ws.applyFilterAsync(field, value, tableau.FilterUpdateType.REPLACE);




      The network calls to Tableau for this function are being made sequentially. The call related to next function call is being made only after the response related to the current one is received. The result is the time taken to apply the filters across the worksheets is very long. The entire dashboard freezes (with the progress icon spinning) while these filters are being applied.




      1.     How can we make these calls concurrent? Is there anyway we can reduce the execution time for this logic and make the dashboard appear faster?

      2.     Can we make the progress spinner disappear as the filters are being applied on each worksheet? Can we show each worksheet as soon as the filter is applied, instead of waiting for the other worksheets?


      Thanks in advance,