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.

Insert PDF script step with file path to a folder

Featured Replies

  • Newbies

Hello, I would appreciate help with the following. If there a simpler way, or if I've gone off in the wrong direction, please let me know.

I want the user to be able to insert a PDF into a container field in each record of a table.

To do this, I tried a simple script as follows, activated by a button in the layout:

Go to layout [...]

Go to field [...]

Insert PDF [filemac:Macintosh/Users/kjc/Personal/Genealogy Docs]

The problem is the Insert PDF script. When I paste the path into the script step, I get a message asking me to fix the syntax and try again. I don't know the reason for this.

The help files give the following example of specifying a relative path:

filemac:directoryName/

From the example I assume I can use a path to a directory instead of to a specific file. If that's correct, then it's not the source of the error. The syntax looks good to me, it's pretty standard.

The directory contains hundreds of PDF's. The user will choose them one at a time as part of completing a record that displays the PDF and contains a brief summary of its content. I've assumed there is no way to do a mass import of the PDF documents into container fields, but if anyone can suggest a way to mass import PDF's, I'd appreciate if you could explain how.

Thanks in advance for any help.

You can only hold one file in a container, so the insert PDF step requires a filename with path, not just a path. If you leave the source file empty, FM will display a dialog where you can select the PDF file to import, which is probably what you want.

From the help: When Insert PDF is performed, unless a file is specified with the Specify source file option, FileMaker Pro Advanced displays a dialog box where the user can select and preview the file to be imported.

A path is not a file, therefore FM displays an error.

You could do a mass import by importing a list of PDF names in a folder into a value list, and then loop through each list item and create a new record for each, and import each PDF individually.

 

5 hours ago, kenco278 said:

The directory contains hundreds of PDF's. The user will choose them one at a time as part of completing a record

Is there anything in the record's data from which the name of the correct PDF to choose could be determined? Perhaps all you need is a calculation field with a container result.

 

5 hours ago, kenco278 said:

if anyone can suggest a way to mass import PDF's, I'd appreciate if you could explain how.

https://fmhelp.filemaker.com/help/18/fmp/en/index.html#page/FMP_Help%2Fimporting-folder.html%23

Create an account or sign in to comment

Important Information

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

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.