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.

Specifying variable output file path

Featured Replies

Hi,

I'm trying to set up a script which will print various layouts to one pdf. I would like the PDF to be saved to the user's desktop and subsequent layouts printed to append to the original file.

I got it to work with a db stored on my local drive, using the following as the file path: filemac: $filepath Get(DesktopPath) & "HMMP_Interview.pdf"

However, the filename it gives the PDF file is everything after "filemac:" and all I want is the part in quotes.

Also, when I imported the script to the database hosted on FM9 server, it no longer works, I get an error message about not being able to create the file on the disk.

How can I get this to work, where the initial PDF created is in the current user's desktop folder (mac) and is named "HMMP_Interview.pdf"?

Thank you!

It should still work when hosted on FMS.

Regarding the setting up of the file path: create a variable with this expression:

Get( DesktopPath) & "filename.pdf"

and specify this path in the save as pdf step. There is no need to add "filemac:" because FMP is smart enough to work it all out by itself. This also makes it cross-platform with no additional effort.

It could be that the desktop does not allow write permission -- not common with Macs but a common setup for PCs in a corporate environment. However the user always has write permission to the temporary path, so for testing I suggest the script be changed to save to the temporary path (specify to open the file after saving so you can see it worked). Once that is OK then change back to the desktop and see what happens.

  • Author

Thanks, that worked. I ended up having to read up on variables, since I didn't realize there was a script step one has to use to define the variable first. Oops!

I'm learning, one problem at a time. LOL

  • 1 month later...
  • Newbies

I was having a lot of problems and following closely to instructions..after trial and error I found out was..my problem was that I was using a "DATE" inside the filename.. for some reason when I deleted the DATE from the filename it worked. At first I thought it was the DATE FORMAT..so I tried spaces and periods inbetween..but still..would not let me save the pdf file.

I don't know why filemaker doesn't allow you to use a DATE FIELD in a FILENAME.

Hmmmmm? Would be very handy since our PDFs go out to a film production crew.and the call sheet represents the date.

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.