Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
timmy
Partner - Contributor III
Partner - Contributor III

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.