Hello,
How can we set "OR" case record filtering ?
Eg. on table 18 Customer, I would like to filter records that are
1) Country Code = 'US'
OR
2) Balance (LCY) > 0
If I write something like this:
Customer.SetFilter("Country Code", 'US');
Customer.SetFilter("Balance (LCY)", '>0');
This would give me the "AND" case.
Any idea?
:-k
0
Comments
maybe it's not very performant, but on small to medium tables it works :?
Thanks for your idea.
Ken
[/code]
You could create a Temporary record and insert all records that apply to your filtering.
* Code has not been tested.
BTW, Marking records perform perfectly as long as you select the primairy key. If you need to set another key it's better to you code above... I think...
If it was hard to write, it should be hard to understand."
You should have the best key dependend to your filter.
Before you set Cust.MARKEDONLY := TRUE it is recommended to change the key to the primary key because with that key you get the best performance for viewing the records.
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]