You can use Save As PDF to append your new PDF to the end of an existing PDF--such as the one stored in your container field, but not the opposite. The existing PDF will always be the first part of the document and the newly generated PDF you are about to save will show as the latter part of the document.
If that works for you, you can use Export Field Contents to export a copy of the PDF and then a script can use Save As PDF to append a new PDF to the end of it if you select the "append" option.
The trick is to assign a file path to a $Path variable first, then use that variable with Export Field Contents to export a copy of the existing PDF, then use the same variable with Save As PDF and with the append options selected to append the new PDF to the end of the exported copy.
That order, although understandable will not work. Can we attach two different PDF files to an email via the send mail script step? One the newly created pdf and the second the existing PDF that is in the container filed?
Can we attach two different PDF files to an email via the send mail script step?
Not with just FileMaker. There are a number of email plug ins out there and I suspect one or more them would offer support for multiple attachments.
And no, I don't know why FileMaker Inc. didn't add support for multiple attachments a long time ago.
Thank you for your assistance. For now we will simply send two consecutive emails.
There is another option, but you'll have to decide if it's possible/practical for what you need to do:
Use a layout in FileMaker to recreate the content of the PDF you are currently storing in that container field. Then, when your script needs to generate the PDF and attach it to an Email, it can use Save As PDF to generate your other PDF first, then use Save as PDF and this layout to generate and append the second PDF.
Obviously, that take quite a bit of effort and may not be possible in every situation.