Qlik Community

Ask a Question

Qlik Sense Integration, Extensions, & APIs

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

Announcements
Join us March 10th, 7 ways modern analytics can help you take smarter action. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
timmy
Partner
Partner

getData() and Databind not working as expected

Dear all,

For a customer, we are working on integrating Qlik Sense into a new designed website. For this to work, we need the mechanism GetData() from a specific field (after making selections in other fields first). We than reuse the values in a JS dropdown to make selections in a Qlik Sense chart (so we combine JS filter with selection in QS but this has no issues, this works perfect).

The issue is with the values that we get out of the GetData and leter de Ondata.bind function.
This is not taking into account the previous selections made in the "app" (in our case called app1) which i would expect it would do...

This is the code we use (some elements of datavalues are in Dutch but I can assure you, the clear and the selections are working fine)

...
app1.field('ID').clear();
app1.field('ID', 'Kaart').clear();
app1.field('BenchMarkFilterWebKey').clear();
app1.field('ID').selectValues(['AR_02'],false,true);
app1.field('ID', 'Kaart').selectValues(['AR_02'],false,true);
app1.field('BenchMarkFilterWebKey').selectValues(['41002|VlaamsGewest'],false,true);

var filterFieldData = app1.field("C_Vraag_L").getData();

filterFieldData.OnData.bind( function(){
filterFieldData.rows.forEach(function(row){
console.log(row.qText);
});
});
...

The issue is that in the console, all the values in the field "C_Vraag_L" are send back as result and not the "filtered" values by the previous made selections.

Can somebody assist?

Kr,

Diricx Timmy

Labels (2)
1 Reply
ErikWetterberg

Have you checked the qState value for the rows? It should reflect the selection state.