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.

create invoices and mail as attachments to found set

Featured Replies

I'm trying to make a database that can print invoices as PDF's and send them via email...

the Print script step seems to do what i want if i use a loop and perform w/out dialog, specifying "Mail PDF" as the print options.

this generates seperate emails, each with it's own invoice attached.

the only problem is that it doesn't give any options for setting the email address based on a field!!

I tried using automator and added the "extract field data" step before the new mail step, but it puts the email address in the body of the text instead of the TO field, and i cant figure out anyway to change that.

anyone have any ideas???

Why aren't you using the standard Save As PDF script step? This allows attachment to e-mail directly as well as specification of email address / content.. or maybe i just automated it, i forget - but it's easy to automate.

  • Author

I was originally, but im printing out multiple invoices to PDF...everytime the script loops it overwrites the pdf file with a new one and i end up with a bunch of emails that are addressed correctly, but all have the same attachment...

am i missing something about the way this works?

Ummm...Nevermind, I've been working too hard today...

I went through the script again and using print to pdf seems to be working now...I guess it's just time for a break :

Edited by Guest

Yep, use variables and something akin to the following script:

Loop

SetVariable[$name ; yournamehere]

SaveRecordsAsPDF[i forget this syntax - but the emaily bit goes here, - without dialog]

Go To Record[next ; exit after last]

End Loop

Oh well, as long as the problems resolved.

The syntax for the Set Variable and/or Save Record as PDF (depending on how you implement the solution) is quite a bit more complicated than what you show, Genx. You need to specify a path somehow, not just the name of the file. The complete path needs to be specified in the variable and the variable referenced in the Save Records as PDF options OR the name can be specified in the variable and placed at the end of a path in the Save Records as PDF step. There is an example of how to do this on my web site:

http://www.filemakerpros.com/SAVEDYN.zip

  • 2 months later...

Hi,

Sorry for the 'late posting'. I've just been wrestling with the same problem. I've just posted the workaround that seems to work for me to the PDF section of this forum. In essence, in a loop I defined a temporary variable to name the current pdf in a [save Records as PDF] line. Then I used the [send Mail] script to send the message to an email address from the DB, add a Subject and a Message, then used the temporary address in the Attach File dialog box.

best wishes,

Peter Mayer

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.