Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
akeswani
Creator
Creator

Qlik Engine API - GetListObjectData - qHeight

I have a web app (in Angular) that opens QS apps in iframe, and a chat window on the side. User can select the values on QS app, and can share it as a link on chat window. When another user clicks on that link, the same selections are applied. This was working fine till now. Now, there is an app that has lots of data, and some selections are working and some are not, when the links are clicked. 

here is the logic working so far (using Engine API) when applying selections:

for each selected field :

call to CreateObject

then call to GetListObjectData

then match the selection values to data returned from GetListObjectData, to get Element number

then call to SelectListObjectValues with that Element Number

then call CreateSessionSelection and GetLayout to display/apply the selections. 

 

I thought the problem was that qHeight of GetListObjectData was set to lower value (2000 and the data coming in is like 33,000 ), and that above step to match the selected value in data returned from GetListObjectData is failing when the value in not among those 2000 values. So I increased the qHeight to 10000, but it doesn't let me go higher than that. How can i increase the qHeight to be the count of values in the field ? or is there a better way to accomplish this ? is there any other way i can get the Element number of selected values ,so I can pass that to SelectListObjectValues ? 

"method": "GetListObjectData",
"handle": parseInt(fieldHandle),
"params": [
"/qListObjectDef",
[
{
"qLeft": 0,
"qTop": 0,
"qWidth": 1,
"qHeight": 10000
}
]

....

var matrix = data.result.qDataPages[0].qMatrix;
resolve(matrix);

 

Thanks in advance.

1 Solution

Accepted Solutions
Øystein_Kolsrud
Employee
Employee

To do paging, you simply need to call the GetListObjectData method multiple times, but change the value of the qTop property. If you use qTop = 0 and qHeight = 100, then you will get row 0..99. If you do qTop = 100 and qHeight = 100, then you'll get row 100..199.

View solution in original post

4 Replies
Øystein_Kolsrud
Employee
Employee

Data retrieval from list objects and hypercubes have a limit of 10k cells, so if you want to navigate data larger than that, then you'll have to implement a paging strategy.

But you could try to use this endpoint instead:

https://help.qlik.com/en-US/sense-developer/June2019/APIs/EngineAPI/services-Field-SelectValues.html

It allows you to select values directly on a field instead of going through a list object.

akeswani
Creator
Creator
Author

Thanks, I can try calling GetField and SelectValues.

how can I implement paging strategy ? First I thought multiple data pages must be returned by API and I can loop around. But it was only one qDataPages in GetListObjectData with a limit of 10000.

akeswani
Creator
Creator
Author

I just realized that i was using GetField and SelectValues at some point of time, and it didn't work. 

My previous post here (GetLayout-method-not-returning-selections) because of type of field.

Anyway, can you please tell me about paging ? i think i would go that route if possible.

Thanks.

 

Øystein_Kolsrud
Employee
Employee

To do paging, you simply need to call the GetListObjectData method multiple times, but change the value of the qTop property. If you use qTop = 0 and qHeight = 100, then you will get row 0..99. If you do qTop = 100 and qHeight = 100, then you'll get row 100..199.