extensions-api icon indicating copy to clipboard operation
extensions-api copied to clipboard

getSummaryDataReaderAsync return no data after using ui filters

Open Oytoch opened this issue 1 year ago • 0 comments

The issue Hello, Dashboard UI Filters seems to break "getSummaryDataReaderAsync" function : No data returned

Context :

  • I use tableau server with virtual connection.
  • My dashboard have UI filter.
  • I have created an extension with a button that executes "getSummaryDataReaderAsync" at click.

At First, dashboard load ( with Filter cached or not) , the function retrieve correctly data, but when I filter with UI, no data found on the second click.

I think it is an issue based on virtual connection.

Version information:

  • Tableau Server 2023.3
  • Browser firefox or Edge (last version)

You can test with this code:

`document.addEventListener("DOMContentLoaded", function() {

    tableau.extensions.initializeAsync().then(async function () {
        document.querySelector(".btn-dl").addEventListener("click", async  () => {
            
            const dashboard = tableau.extensions.dashboardContent.dashboard;
            for (let index = 0; index < dashboard.worksheets.length; index++) {
                
                const worksheet = dashboard.worksheets[index];
                const dataTableReader = await worksheet.getSummaryDataReaderAsync(undefined, {
                    ignoreSelection : true,
                });
                
                // problem here totalRowCount = 0 but there is data ! 
                if(dataTableReader.totalRowCount ==0)continue;
                const dataTable = await dataTableReader.getAllPagesAsync();
    
    
                await dataTableReader.releaseAsync();
            }
            
        })
    } ).catch(err => {
            console.log(err)
            
    });
   
});`

Maybe my code is wrong ? Can I find more log somewhere ?

Oytoch avatar May 19 '24 15:05 Oytoch