November 17, 200817 yr Greetings! A problem I have noticed in our stock system is that very often the shipping costs of items are not allocated to the invoice for the product shipped in. This obviously pushes up our overheads. What I'd like to do is flag those records in stock that have a shipping cost attached to them. The common denominator will be the Order Number. My logic thus far says: find the records related to shipping/courier fees (as these are entered into the system when booking in stock), extend the found set of each shipping record so as to show the matching product records and then flag them. My script so far is as follows (I'm just trying to get the loop to work!) Set Error Capture [On] Perform script "Find Shipping Invoices" Go to Record/Request/Page [First] Loop Go to field [C3 Stock::C3 Order Nº] Extend Found Set [] Go to Record/Request/Page [Next; Exit after last] End Loop The problem is that my loop just moves between the first and the second record... Could anyone provide some insight please as the light is just not going on! Many thanks!
November 17, 200817 yr I would perform the entire search before going into the loop. Set Error Capture [On] Perform script "Find Shipping Invoices" //You would enter "New Record/Request" Set Field(C3 Stock::C3 Order Nº;"=" yourflag) Extend Found Set [] This should be included in your find script! Go to Record/Request/Page [First] Loop If(flagfield = "????Whatever you want here" Set field [C3 Stock::C3 Order Nº; "Something"] Endif Go to Record/Request/Page [Next; Exit after last] End Loop I hope this sets you in the right direction Edited November 17, 200817 yr by Guest
Create an account or sign in to comment