Hello,
In record filter not in operator is not working for multiple selection.
for single selection is working.
If I passed IN operator, then working as expected.
can anyone help me on this? please find code for reference.
Discussion posts and replies are publicly visible
Hmmm, isn't this expected behavior? Just to give an example, suppose I have 10 values in my list (1-10). If I use the operator "not in 1", that will return me 2-10. If I select both "not in 1" and "not in 2", that gives me the sets of 2-10 and 1 + 3-10. If you find the union of that list that returns all the values, so it's not filtering anything.
If that's not what you want, can you talk a bit more about your use case?
Selected values need to be excluded from grid. For example all department names {"IT", "Finance", "Banking", "Other"} showing in dropdown
if I select IT, Finance (Multiple Selection) then need to exclude this department and show all remaining records
Unfortunately I don't know of a way to achieve this using user filters. When you have a multi-select filter, it always combines selections together using the OR operator. As a work around, you could try to create your own dropdown and just build a filter based off that instead.
Why do you create a queryFilter for each department? This leads to the conflict Peter Lewis described. Instead, you could try to put all department IDs in a single filter with a "not in" operator.
In record filter side how to put all department IDs in single filter? can you please elaborate more.
I am not sure what you mean. The queryFilter takes a list of values for the "not in" operator. Just put all values in ONE filter instead of creating MULTIPLE filters.
Stefan the problem is how you specify that as part of a user filter. Since it's a multi-selection, you need to be able to select each row but then have the filter all apply as a single filter. I don't think that's possible unfortunately.
Hm ... true...