Re: PDF into a container field, email
it and save on a disk - all within the same script?
On Nov 10, 2011, at 5:47 AM, Aki Armann Jonsson wrote:
> Is there a way to generate a PDF(invoices) and place it into a container
field and send it in an email as an attachment, all within the same script?
>
> I am working in Filemaker 11v4 on a Mac and all the files are being
served from Filemaker server 11 on a MacMini. It is a multi-user solution.
>
> It would also be nice to be able to save the PDF's in a designated
folder on the MacMini.
To specify where you want the PDF saved you'll need to use a variable as
the path. e.g.
Set Variable [$path; Value:Get(DesktopPath) & "yourFileName.pdf"]
The "Save Records as PDF" script step has "Create email
with file as an attachment" as one of its options.
Save Records as PDF [No dialog; "$path"; Create email;
Current record]
To then place it in a container field, use the Insert File script step,
also relying on the $path variable you created.
Insert File [YourTable::YourField; "$path"]
The documentation for each of these steps should get you the rest of the
way there.