Skip 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.

PDF into a fully populated email?

Featured Replies

Just looking for some basic pointers on this; I have a script that builds a complete email ie: it populates, the address, subject and message body. I am now being asked if I can make the body into a PDF file. I have managed to trigger an empty email with the PDF sitting in the body, but thus far, I cant manage to populate the address and subject lines of the email. Any ideas how this can be achieved?

I have a script that first saves the found set as a pdf into the systems temp folder, then I use the send mail and attach the PDF just created. For security purposes I overwrite the PDF after sending the email.

  • Author

That sounds good - create a PDF, then attach it to an email. What I am not sure about is the location of the PDF. I dont know what the Systems Temp Folder is but different machines will have different drive names. Is it possible to script a file location that will be universal for all my (Mac OSX) clients?

In FM9 there is a new function Get (TemporaryPath) that resolves to the OS temporary folder.

Since the profiles are often not updated, perhaps you have FM9?

  • Author

Correct - I am using v9 but forgot to update my profile.

To my embarrassment all my FM books are on v7,8 and 8.5 so I had not heard of this script step. Time to go shopping for new books!

Thanks for your help.

I don't know what FileMaker 9 books say about this new function. But there is some discussion (on TechNet) about what exactly that folder does with files. If you open it and watch you will see that FileMaker creates and deletes (when it quits) FileMaker application temporary files within that folder. But I don't know when, if ever, other files are deleted (if you know, please tell us). FileMaker doesn't delete them when it quits. The OS does not delete them when you restart. I have a file I put in there (manually) 4/10/2008. It's still there.

So it is not really the OS temporary folder, of which there's more than one. Each user has one (I'm going to use AppleScript path syntax, but you can convert to FileMaker easily), If you're the only user it will be:

"Macintosh HD:private:var:tmp:folders.501:TemporaryItems:"


But if multiple users yours may be 502, etc..



AppleScript can easily get that path, with:



path to temporary items



Which you can set to a global field, using the Perform AppleScript step.



Anything in that folder will be deleted upon restart. So, if you're exporting a lot of large PDFs, I'd investigate.



To see FileMaker's temp folder, run this AppleScript.





set p to alias "Macintosh HD:private:var:tmp:folders:501:TemporaryItems:FileMaker:"

tell application "Finder"

	open p

	activate

end tell

Notice the subtle difference. FileMaker's path has: folders:501

You user temp folder has: folders.501

[P.S. There is also a Get ( SystemDrive ) function in FileMaker (came out in 8), which can get the hard drive name, if you want to try and calculate the path directly. But there's still the 501, 502 problem. Though most people are going to be 501.]

Edited by Guest

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

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.