Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I retrieve data for an extension object in several chunks?

The default page height for an extension object is 40, which means that only the 40 first rows of data of the object will be returned from QlikView. It is possible to set a higher value to get more rows in a single refresh, but with thousands of rows it slows down QlikView a lot. The API seems to provide some objects to fetch data by chunks instead of getting it all at once, however there is not a single extension example showing how to achieve that.

So far I was able to do:

            this.Data.Page = new this.Data.PageObject(this.Data, 100, 1);

And then call this.Data.Page.Next() to get the next 100 rows.

However I did not manage to get the last rows if the number of rows of the last page is less than exactly 100. Also, given there were no example and the sdk I am not sure at all that it is the correct way to do it.

I also tried calling this.Data.SetOffset({ x: 0, y: startIndex}); but it resulted in my Data.Rows object becoming empty.

A working example from QlikTech would be very appreciated.

2 Replies
RSvebeck
Specialist
Specialist

Hi

Have you looked at the StreamChart example?

In that example, the PageHeight is left out from the extension definition XML and instead it is set like this in the script:


this.Data.SetPagesize({x: 200, y: 200}); // Might need to be decreased/increased for performance

Don't know if it will help you. I have also problems with speed and extension objects and big data.

Best Regards, Robert

Svebeck Consulting AB
ErikWetterberg

Hi,

You should be able to use the SetOffset function to scroll through your dataset, but it seems there is a bug in it. I attach a small exemple with some buttons to scroll forward and backward. It also includes a patched version of the SetOffset function, which you can include in your extension.

Erik