Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

rubenagm
New Contributor

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!

Tags (1)
4 Replies
erik_wetterberg
Honored Contributor

Re: table.rows Not working

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

Erik Wetterberg
https://extendingqlik.upper88.com/
Employee
Employee

Re: table.rows Not working

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.

rubenagm
New Contributor

Re: table.rows Not working

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.

erik_wetterberg
Honored Contributor

Re: table.rows Not working

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

Erik Wetterberg
https://extendingqlik.upper88.com/
Community Browser