Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
}
}
I had similar issue, I tried this
It's working for me
Thanks for your help BGN
What is your pageheight in the definition.xml?