Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
AyeshaChhapra
Contributor II
Contributor II

Issue with applying multiple filters across different fields using app.field().selectValues()

I’m facing an issue with applying filters dynamically in my app. My goal is that whenever a user selects a field name and value, a filter should be created for that selection and applied to the UI.

Currently, I’m using:

app.field().selectValues()


This works fine for a single field. However, the problem arises when a user makes selections across multiple fields (e.g., vendor: xyz, city: abc). In that case, only one filter gets applied — either the first or the last one depending on the toggle. Multiple filters never get applied at the same time.

Has anyone run into this before? How can I apply multiple selections across different fields programmatically so that all of them persist on the UI?

Sample Code:

 await Promise.all([
          app.field('[VENDOR NAME]').selectValues([{ qText: 'BOSCH' }], false, false),
          app.field('CITY').selectValues([{ qText: 'Mumbai' }], false, false)
        ]);
 

Thanks in advance!

Labels (3)
2 Replies
alex_colombo
Employee
Employee

Hey @AyeshaChhapra , are you sure that the selections you are applying is a valid selection? Can you apply the same selection in Qlik app and share with us if it is working or not?

Your code seems ok, so I guess maybe one selection is removing the other because are not linked in data model.

AyeshaChhapra
Contributor II
Contributor II
Author

Hey @alex_colombo 

I checked: the column names and the selected values exist. I can pick one value at a time, and that works. But picking both values at once doesn’t.

  • Column names exist: yes
  • Single value works: yes
  • Both values together: not working