AnsweredAssumed Answered

Append PDF duplicates records instead of ones browsed

Question asked by JulioSandoval on May 1, 2017
Latest reply on Sep 26, 2017 by dbsjef@gmail.com

Hello,

I have a weird issue that just started happening when I use the 'Print to PDF' script step in a loop.

I have a script that passes through and prints out a set of pages. When I use the script Debugger and when I reach the spot I am having issues with, I can see, during the preview, that it is in the correct record; showing the correct page, but once it is done and saved as a PDF, it is showing the first record that was browsed.

 

I have attached a snapshot of the script I am using.

 

Screen Shot 2017-04-28 at 3.16.19 PM.png

If you notice, I have it go to the layout First, Performs a Find based on a Variable - It finds the proper records.

Then it goes to the first record, (for this example, lets say record # 36)

Starts a loop and saves the record being browsed to a PDF. Then it moves on to the next record in the found set.

The Custom Dialog which SHOULD show the next records ID, does not. It still shows record #36.

 

I have no clue as to why. Even though as I go through each script step and I can visually confirm it is moving to the proper record in the FileMaker client, it does NOT save the proper Record.

 

If I switch the option on the 'Save Record as PDF' from Current Record, to records being browsed, it saves the proper records to PDFs, but it duplicates them 3 times and does not set the proper page numbers.

 

Attached is also the end result

The Observ ID: should be 36, 37, 38 but all three pages stay at 36 showing the exact same record.

Screen Shot 2017-04-28 at 3.31.43 PM.pngScreen Shot 2017-04-28 at 3.31.55 PM.png

 

 

Screen Shot 2017-04-28 at 3.32.01 PM.png

 

Thank you all for your help.

Outcomes