Table A:
"No.", "Name", "Location"
Table B:
"No.", "Company", "Table A No."
Table A - Data:
1, One, Mibuso
2, Two, StackOverflow
3, Three, Mibuso
Table B - Data:
10, Comp A, 1
20, Comp B, 3
30, Comp C, 2
40, Comp D, 3
TableA.SETFILTER("Location", "Mibuso");
TableB.SETFILTER("Table A No.", TableA."No.");
10, Comp A, 1
20, Comp B, 3
40, Comp D, 3
Answers
Wrte this code.
TableA.SETRANGE("Location",'Mibuso');
IF TableA.FINDSET THEN
REPEAT
TableB.SETRANGE("Table A No.",TableA."No.")
IF TableB.FINDSET THEN
REPEAT
//Here you will have all your 3 records
UNTIL TableB.Next=0;
UNTIL TableA.NEXT=0;
Note - Make Table A and Table B local variables.
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/
I want the range to be set .. not one by one, but almost an smart way to set the whole filter at ones.
Your way, I might set a local var as Text (FilterText)
And then do this:
And then set it as filter: