2 Replies Latest reply on Jan 9, 2019 4:09 PM by Yusuke Miyamura

    About update completion flag by refreshDataAsync ()

    Yusuke Miyamura

      We are updating the dashboard using refreshDataAsync ().

      As below

       

      <!DOCTYPE html>

      <html lang="en">

        <head>

        <title>Tableau JavaScript API</title>

        <script type="text/javascript" src="http://servername/javascripts/api/tableau_v8.js"></script>

        </head>

        <body>

        <div id="tableauViz"></div>

       

      <script type='text/javascript'>

      var placeholderDiv = document.getElementById("tableauViz");

        var url = "http://servername/t/311/views/Mayorscreenv5/MayorScreenv2";

        var options = {

          hideTabs: true,

          width: "100%",

          height: "1000px"

        };

        var viz = new tableauSoftware.Viz(placeholderDiv, url, options);

       

      setInterval(function () {viz.refreshDataAsync() }, 3000);

       

      </script>

      </body>

      </html>

       

       

      However, with SetInterval, the next refresh will start even if the refresh is not completed.
      Is there a completion flag for refreshing?