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.

Open PDF from Container Field

Featured Replies

Hi Everyone,

I am sorry, I know this has been asked a buch of times but I still can't get it to work.

I would like to save PDF files in a FM database and be able to open them using their origanal program! I know how to do it by just saving a reference to the file, but not by saving the entire file.

Would it be possible to move a copy of the files, via applescript, into one folder (associated to the database) during the import. That way I could one folder that contains all the PDFs and I could be sure not to move it or delete any files.

I am using FMP7 and OS 10.3.8.

Thank you very much for your help

Sebastian

  • Author

Okay,

I think I solved my own problem.

I took an applescript writen by Frenton and changed it a little bit. It now loads the entire file into a container field and if I ever want to open it in its original app, it exports the file into a DATA folder associated with the DB. Plus it also checks to make sure I don't export the file twice.

I would still appreciate any ideas on how to improve this File. I have never applescripted anything so... we'll see.

Thanks

Sebastian

PDFArchiv.zip

That's a clever idea, to use FileMaker's error checking. But it always gets an error, 'cause you put the serial number field in that AppleScript, instead of the Name field, like you did in the 2nd AppleScript.

Another little cleanup, you don't need the Export.pdf path line in the 1st AppleScript, as it's only opening the file if it exists.

  • Author

Hi Fenton,

I am sorry about the file checking skript, I attached an older file, I already had that fixed.

Which lines can I delete in the 1st AppleScript? I don't know how to tell Appleskript to get a filename from FileMaker and then open that file in the finder.

Thank you very much for your help, I really appreciate it!!!

Sebastian

This is the 1st AppleScript, which tries to open the file. No "Export.pdf" line needed, 'cause it doesn't do anything with the export file in that 1st script.

tell current record of window 1

set myFolder to cell "myFolder"

set newName to cell "Name"

set newFolder to myFolder & "DATA:"

end tell

tell application "Finder"

set newFile to newFolder & newName

open file newFile

end tell

You do know how to open the file in the Finder. You just did it above, with the "open" command. That's all there is to it.

  • Author

Thank you Fenton,

It works perfectly!!!

Have fun,

Sebastian

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.