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.
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.
Thank you all for your help.