You can't use OR on two fields. You have to set one filter loop through it and store it in temp record and then set the second filter and store that in temp table.
A second option is to add a new field that has the values of both field A and B and then filter on the third field instead.
Ahmed Rashed Amini
Independent Consultant/Developer
i found it's a little more performant to use marking instead of a temp record but the basic idea stays the same.
setrange(field1, 'A');
if findset then
repeat
mark(true);
until next = 0;
setrange(field1);
setrangE(field2, 'A');
if findset then
repeat
mark(true);
until next = 0;
setrange(field2);
markedonly(true);
now you have your recordset ready for further processing.
Comments
A second option is to add a new field that has the values of both field A and B and then filter on the third field instead.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n