7 Replies Latest reply on Mar 17, 2017 2:33 PM by adam.freeman.2

    Different result data on calling getUnderlyingDataAsync

    Tracey Kuthol

      Hi

       

      I am calling sheet.getUnderlyingDataAsync.  but i am getting different result with trusted ticket url.  Is it how tableau works?

       

      Example 1:  Tableau ask you login. Once you logged in it returning all row data like totalrowcount 270k+

      var viz;

      function initViz() {

          var containerDiv = document.getElementById("reportViz"),

          var url = "https://reportServerName/t/FullTest/views/FullDataTest/ReportData?:embed=y&:showShareOptions=true&:display_count=no&:showVizHome=no",

          var options = {onFirstInteractive: function () {  listenToMarksSelection();  } };

          viz = new tableau.Viz(containerDiv, url, options);

      }

       

       

      function fullData() {

      options = {

          maxRows: 0, // Max rows to return. Use 0 to return all rows

          ignoreAliases: false,

          ignoreSelection: false,

          includeAllColumns: true

      };

          case 'dashboard':

              var worksheetArray = sheet.getWorksheets();

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

                  sheet = worksheetArray[i];

                  sheet.getSelectedMarksAsync().then(function (marks) {

                      if (marks.length > 0) {

                          sheet.getUnderlyingDataAsync(options).then(function (t) {

                              console.log(t.totalRowCounts);                   

                          });

                      }

                  });

              }

      }

       

      Example 2:  Tableau with trusted ticked. It is not returning all row data. totalrowcount : 5K only.

      var viz;

      function initViz() {

          var containerDiv = document.getElementById("reportViz"),

          var url = "https://reportServerName/trusted/<ticketid>/t/FullTest/views/FullDataTest/ReportData?:embed=y&:showShareOptions=true&:display_count=no&:showVizHome=no",

          var options = {onFirstInteractive: function () {  listenToMarksSelection();  } };

          viz = new tableau.Viz(containerDiv, url, options);

      }

       

      function fullData() {

      options = {

          maxRows: 0, // Max rows to return. Use 0 to return all rows

          ignoreAliases: false,

          ignoreSelection: false,

          includeAllColumns: true

      };

          case 'dashboard':

              var worksheetArray = sheet.getWorksheets();

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

                  sheet = worksheetArray[i];

                  sheet.getSelectedMarksAsync().then(function (marks) {

                      if (marks.length > 0) {

                          sheet.getUnderlyingDataAsync(options).then(function (t) {

                              console.log(t.totalRowCounts);                   

                          });

                      }

                  });

              }

      }

       

      Why tableau not returning all the row data in example 2.  is there is any option to return all row data like example 1.

       

      Thanks