In first loop you've marked several records and then you have them. Where is the problem?
I assume you have to add something like "if stdurchline.remaining qty <> 0 then do... mark(true)"...
Line 1 does not mark 5 records, you are only finding 1 record, so I would expect the list form to only show one record. You will have to loop through all records in the filter and mark all of them.
Wait, hold on, eto is on the right track. You should do a GET on the Item table, because you know the item number. Then right before you do MARKEDONLY, you should do a RESET first. The issue is that you have a filter on the item number, so by the time that you are showing the form, you have a filter on the item number, and MARKEDONLY=TRUE. Do a RESET to remove all filters, then do MARKEDONLY, and then you should see all marked items in your list.
Comments
Hi
Before the markedonly, remove the "item No." filter applyed on previus loop...
Something like:
...
RecItem.SETRANGE("No.");
RecItem.MARKEDONLY(TRUE);
...
Bye
Matteo
I assume you have to add something like "if stdurchline.remaining qty <> 0 then do... mark(true)"...
RIS Plus, LLC
MVP - Business Apps
RIS Plus, LLC
MVP - Business Apps
Then you need to clear the filter on the "No." field before the MARKEDONLY.
RIS Plus, LLC
MVP - Business Apps
If I use the code below.......
IF ItemRec.GET( StdPurchLine."No.") THEN.... instead of the SETRANGE.
This will solve my issue.........
But It would be more safer to use the Temporary Table concept instead of the MARK Function (As Daniel mentioned )