Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

table.rows Not working

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. errorQlik.PNG

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.

errorQlik2.PNG

I don't know what is my error, thanks for help me!

4 Replies
ErikWetterberg

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

Aiham_Azmeh
Employee
Employee

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

Table API ‒ Qlik Sense

Even though, this seems strange you got a rowCount & colCount, but I agree with erik.wetterberg‌, it is hard without context.

Anonymous
Not applicable
Author

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.

ErikWetterberg

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