Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
Thanks in advance!
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.
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.
Did you try to apply the selections for both values direclty in the Qlik app? Just want to be sure that this is not a Qlik data model issue or wrong selections.
@alex_colombo yes, I can apply selections for both directly in the Qlik app
can you please try to modify your code in this way and give it a try?
await app.field('[VENDOR NAME]').selectValues([{ qText: 'BOSCH' }], false, false),
await app.field('CITY').selectValues([{ qText: 'Mumbai' }], false, false)