Hello,
can someone explain me how to combine filters across multiple fields?
How do I filter for the following records in a query?
record 1: field A: value C, field B: value D
record 1: field A: value E, field B: value F
...
When I use SetFilter("Field A"; 'C | E') and SetFilter("Field B"; 'D | F'). I also get the record where field A has value E and field B has value D.
Thank you and best regards
Nico
Using the two methods, I retrieve each record individually. Unfortunately that doesn't solve my problem.
I am working in a report with a dataitem. I can't pass many individual records there, just a filtered list.
Hi,
You can try two method below
Try with
Record.Get("Primary Key first field","Primary Key second field");
or
Record.reset;
Record.setrange("Primary Key first field",<Value>)
Record.setrange("Primary Key SEcond field",<Value>)
Record.findfirst;
Thanks.
Sorry, I didn't explain my problem properly.
I have a table whose primary key consists of two fields. This means that I can only uniquely select a record with a combination of the two fields. But I want to select multiple records at the same time, which means I have to specify multiple of these combinations as well.
In my case it is about the "Job Task" table, which primary key is clustered by the fields "Job No." and "Job Task No.". I would now like to select job task 1000 from job 12345 and job task 1200 from job ABCD. But I don't know how to specify the filter in order to only get these two job tasks and not also the job task 1200 from job 12345 and the job task 1000 from job ABCD.
Hi, hope the following helps.
Cross-column search (OR filters on multiple fields) ★FilterGroup(-1)
Thanks.
ZHU
What your are using is an "or" filter so to me it looks like the system is behaving exactly as designed.
What is the result you want to achieve with your filtering?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156