Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5219 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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!

Posted

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.

Posted

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
Posted

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.

This topic is 5219 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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