November 12, 20196 yr I've got very little experience in working with "go to related records". I've managed to get to print Customer and Merchant invoice. I'm having difficulties in printing QR-Code Coupon. When comes the time to print the coupon there are 3 records in the "Data Invoice" table. I am trying to print each of those three records as individual coupon. The expectation for this request is to produce 1 Customer invoice, 1 Merchant invoice and 3 QR-Code coupons. At the moment, I only getting 1 Customer invoice, 1 Merchant invoice and 1 QR-Code coupon. I've inserted a loop in order to print each of the 3 coupons and for some reason it does not work. Would someone have an idea why I cannot print those three coupons? Thanks in advance! TSP100_InvoicePrinting.pdf Edited November 13, 20196 yr by DPaquin
November 13, 20196 yr Author Is there a reason for not being able to loop on selected records of a go to relation? Or is there a way to make those selected records being something like in the present case page 1 of 3 for record « solo 0101 », page 2 of 3 for record « solo 0305 » and page 3 of 3 for record « solo 0306 »? I am thinking of something, is it as simple as changing print setup i.e not use related records in the print. I want to avoid printing 300 pages for no reason. thanks. Daniel Edited November 13, 20196 yr by DPaquin
November 13, 20196 yr 44 minutes ago, DPaquin said: Is there a reason for not being able to loop on selected records of a go to relation? No. Unfortunately, this is the only part of your question I did understand, so this is the part I am answering. To loop over related records, you would do (pseudocode): Go to Related Record [ Show only related records ; From table: "Child Table" ] Go to Record [ First ] Loop # DO SOMETHING Go to Record [ Next; Exit after last ] End Loop Go to Layout [ original layout ] Note: If you're not calling the script from an active portal row, then you don't need to go to first record explicitly; If it's possible that the parent record has no related records in the child table, you should test for this first; otherwise you might get unexpected - and potentially disastrous - results. Edited November 13, 20196 yr by comment
November 13, 20196 yr Before your Loop script step, try adding in Go to Record [First] as @comment indicated.
Create an account or sign in to comment