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: 
tschollqlikview
Partner - Contributor III
Partner - Contributor III

How to access ALL data from an object

Hey there,

I have a problem to access data from a large table via an extension.

When I want to access the data, I can only read the first 40 rows, although the table has hundreds of rows.

My code is as follows:

var lb = doc.GetObject("TB01"); // the  table object

     lb.SetOnUpdateComplete(function() { // when data is loaded

                        console.log(lb.Data.Rows.length]); // always 40

                            for (var i = 0; i<lb.Data.Rows.length; i++) {

                                    //…..

                }                   

});

Does anyone have a clue, how to access the data of the 41th …XXth row?
Thx

3 Replies
Not applicable

Try this one,

qva.GetQvObject("TB01",getTblData); // the  table object

function getTblData()

{

  var _this = this;

  var tblName = _this.Name;

  var totalRows = _this.Data.TotalSize.y; // get totalRows

  var currRows = _this.Data.PageSize.y; // get current rows (always less than 40)

  if(totalRows > currRows){ // if totalRows > 40

    _this.Data.SetPagesize(_this.Data.TotalSize);

    qva.GetQvObject(tblName, getTblData);

    return;

  }

  var data = _this.Data;

  //reset the page size

  _this.Data.SetPagesizeY(40);

  _this.Data.SetPagesizeX(40);

  for (i = 0; i < data.Rows.length; i++)

  {

  //Your code

  }

}

nabhiram
Contributor III
Contributor III

I had similar issue, I tried this

It's working for me

Thanks for your help BGN

adamdavi3s
Master
Master

What is your pageheight in the definition.xml?