You cannot, this will give you "a=cccc AND b=ddd" filter, not "a=cccc OR b=ddd". You cannot filter to two different fields with OR between them. You need to do two passes, one for each filter, and the result must be buffered or marked (mark could be problematic on big results). Just search the forum, this was already discussed few times... :whistle:
Comments
unfortunately you can not do this using SETRANGE or SETFILTER. You need to use MARK and MARKEDONLY functions instead.
Good luck!
I think we can use the Setview function to filter more then one.
Ex:- Define the variables like as follows
cust Record Customer
FilterTxt1,FilterTxt2 as code variables
FilterTxt1 :='YELLOW';
FilterTxt2 :='10000..32124578';
cust.init;
cust.SETVIEW('WHERE(Location Code=FILTER('+ FilterTxt1 +'),No.=FILTER(' + FilterTxt1 +'))');
Regards,
gbnaidu.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
My Blog - nav.education
Thanks all.