How can I filter a table based on a set of values of another and different table?
for example.
Table1.setrange(name, "peu*");
Table2.setrange(name,Table1.name)...
Table1.setrange(name, "peu*");
IF Table1.FINDSET THEN REPEAT
Table2.setrange(name,Table1.name)
IF Table2.FINDSET THEN REPEAT
table2.mark(true);
UNTIL table2.next = 0;
UNTIL Table1.NEXT = 0;
Table2.MARKEDONLY(true);
-> Findset now delivers all the things you need now.
Assuming i understood your problem
there may be better options to solve this though.
Answers
https://msdn.microsoft.com/en-us/library/dd355214.aspx
From the documentation:
The FromFields and ToFields must be of the same data type, but they do not have to belong to the same table.
IF Table1.FINDSET THEN REPEAT
Table2.setrange(name,Table1.name)
IF Table2.FINDSET THEN REPEAT
table2.mark(true);
UNTIL table2.next = 0;
UNTIL Table1.NEXT = 0;
Table2.MARKEDONLY(true);
-> Findset now delivers all the things you need now.
Assuming i understood your problem
there may be better options to solve this though.
For more info lookup the mark function on msdn
Table2.SETFILTER(Name,Table1,GETFILTER(Name));
IF Table2.FINDSET THEN ....