Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, i have a problem, when I want to do a loop in the rows in my table, the property "table.rows" return a empty array, but when I call the property "table.rowCount" return 644.
I've tried in sense desktop and sense server but I've have the same error. When I inspect with tools in google chrome this is the result.
I don't know what is my error, thanks for help me!
Hi,
Hard to say without the code and context. Is this in an extension? Have you set qInitialDaraFetch? initialProperties property ‒ Qlik Sense
Hope this helps
Erik Wetterberg
Hi rubenagm,
Table API is based on data Events, maybe you need to subscribe to the OnData event:
let table = qlik.table( this );
let listener = () => {
let rowCount = table.rowCount;
let colCount = table.colCount;
let rows = table.rows; console.log(rows);
table.OnData.unbind( listener ); //unregister the listener when no longer notification is needed.
};
table.OnData.bind( listener ); //bind the listener
Even though, this seems strange you got a rowCount & colCount, but I agree with erik.wetterberg, it is hard without context.
erik.wetterberg I'm sorry, I'm using API in JavaScript, I'm trying to use this article QTable ‒ Qlik Sense, I want to get the data from the table, I am working with Mashups.
Ok, and is this the built-in table? Is any data visible in the page? What happens if you create the table outside of the click handler? Just move it up a few lines.
Hope this helps
Erik Wetterberg