Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Go to related record - printing coupon not working

Featured Replies

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!

 

Merchant-1.png

Customer-1.png

Coupon-1.png

Data Relatred Record.png

TSP100_InvoicePrinting.pdf

Edited by DPaquin

  • 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 by DPaquin

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 by comment

Before your Loop script step, try adding in Go to Record [First] as @comment indicated.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.