Dear All Pros,
I want to get Lot No. in reservation entry table in Transfer Line table. I can use flowfield with lookup calcformula and it is fine whenever one line has just one lot no. but when one item shipped from two lot no. my lookup just returns the first value. how can I get all lot no. in one field?
Let me explain it like this : I have Item : 1 which has been shipped by 2 Lot no . 1. 567 2. 789 I want the lookup value to returns something like 567 | 789 in one field.
Or should I use a procedure but I don’t know how I can use a procedure in this situation.
i wrote something like this but it does not work
procedure getlotno(): text
rec.SetRange(“Source ID”, “Source ID”);
rec.SetRange(“Source Ref. No.”, “Source Ref. No.”);
rec.SetRange(“Item No.”, “Item No.”);
rec.Next() = 0;
Why “Reservation Entry” if shipped? Shipped info comes from Item Ledger Entry. For example, see “Item Tracking” from a posted shipment page. Hint: Involves temp table.
Thanks for your reply. I know the temp table “Tracking Specification” but it is for partially shipped entries and even if I can use that table I still have one Item for example Item 1 with quantity of 350 and in those tables I have 250 with lot no. 789 and 100 with the lot no. of 890. I just want to know how I can use a lookup flowfield to get those two lots in one field with something like this 789 | 890, or should I use a procedure in the table to do that but I don’t know how to do it just give a hint.
I do have this procedure but I don’t know how can I update my field with the exit value of the Procedure :
procedure getlotno1(): text
rec.Setrange(“Source ID”, rec.“Source ID”);
rec.Setrange(“Source Subtype”, rec.“Source Subtype”::“0”);
rec.SetRange(“Source Ref. No.”, rec.“Source Ref. No.”);
rec.Setrange(“Item No.”, rec.“Item No.”);
Value1 := rec.“Lot No.”;
if rec.FindSet() then
value2 := value1 + ‘,’ + value2
rec.Next() = 0;
The short answer is a flowfield will not do what you want. You will need to build a function to return your desired string value. You have the basic idea above. But you don’t need to save that to the table. You just need to use the function results where needed. For example, as the source for a textbox on your page.
BTW - “Tracking Specification” (Table 336) is not only for partially shipped entries. The real table holds info for entries that are shipped\received but not invoiced. As a temp table it is used by the Item Tracking page and various related functions regardless of the status of the entries. The usage I referred to in my original post was displaying the Item Trackiing page from a posted shipment. This is showing the information of what was shipped. That information is retrieved from Item Ledger Entry.
Thank you for your reply , I know the procedure is a better idea but there is two thing I do not know. first my procedure that I wrote above is not working properly and I do not know what is the problem . second I want to use it in a report too how can I use this on my report. thank you in progress