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

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

Recommended Posts

Posted

As far as I can tell, the "export as PDF" script step does not let you give a calculated name to the resulting file. Would any one have a work around or a brilliant idea for doing this?

Posted

Set Variable [$FilePath ; Value: "file:" & Get ( DesktopPath ) & Substitute ( Get ( CurrentDate) ; "/" ; "-" ) & ".PDF"

This example saves to the desktop. You can use an explicity file path or a different Get function to save it to any number of other locations.

  • Like 1
Posted

Thanks a lot imoree. But I when I use your calculation to specify out file and path in the "save record as PDF" script step, I get this message when the disk is not locked or lacking space. Any idea what I might be doing wrong?

error.jpg

Posted

Try this

Create a new script with these options"

Set Variable [ $filePath; Value:"file:" & Get ( DesktopPath ) & Substitute ( Get ( CurrentDate) ; "/" ; "-" ) & ".PDF" ]

Save Records as PDF [ File Name: “$filePath”; Records being browsed ]

Hope that helps.

-i

Posted

Great. Thank you so much. I finally understood what I was doing wrong. I was putting "file : $filePath" and not just "$filePath" in the output path.

Now another related question. I have a folder that is mirrored on two computers where I keep all my important documents. But obviously the path to that folder is only partially identical on both computers as follows :

file://localhost/Volumes/Macintosh%20HD/Users/xxxxx/Documents/Krakatoa/Le%20Petit%20Globe/contrats/2012

and

file://localhost/Volumes/Clint/Users/yyyyy/Documents/Krakatoa/Le%20Petit%20Globe/contrats/2012

Is there a way of indicating in a calculation that the document can be saved to one or other of these two destinations ? So in the above calculation instead of Get ( DesktopPath ) what would you put? Or is this not possible ?

Posted

How about something like =

Case (

Get ( SystemDrive ) = "/MacintoshHD/" ; "file://localhost/Volumes/Macintosh%20HD/Users/xxxxx/" ;

Get ( SystemDrive ) = "/Clint/" ; "file://localhost/Volumes/Clint/Users/yyyyy/"

)

&

"Documents/Krakatoa/Le%20Petit%20Globe/contrats/2012"

There are other Get() function that can help you determine the current system, e.g. Get ( SystemNICAddress ).

Posted

Still can't quite get this to work. The value I have put in the variable calculation is :

"file:" & Case (

Get ( SystemDrive ) = "/MacintoshHD/" ; "file://localhost/Volumes/Macintosh%20HD/Users/xxxxx/" ;

Get ( SystemDrive ) = "/Clint/" ; "file://localhost/Volumes/Clint/Users/yyyyy/"

)

&

"Documents/Krakatoa/Le%20Petit%20Globe/contrats/2012"

& Events::Summary & Substitute ( Get ( CurrentDate) ; "." ; "." ) & ".pdf"

And I'm getting a similar error message to the one above. Something wrong with the syntax, but I can't figure out what.

Posted

Offhand, I see you have "file:" twice.

---

Hint:

When you get an error message of the type you have posted earlier, check the contents of the $variable - either in the data viewer or by a custom dialog. Then you can see how it differs from the path you need.

  • 2 months later...
Posted

finally figured out why this wasn't working. Instead of

Case (

Get ( SystemDrive ) = "/MacintoshHD/" ; "file://localhost/Volumes/Macintosh%20HD/Users/xxxxx/" ;

Get ( SystemDrive ) = "/Clint/" ; "file://localhost/Volumes/Clint/Users/yyyyy/"

)

&

"Documents/Krakatoa/Le%20Petit%20Globe/contrats/2012"

& Events::Summary & Substitute ( Get ( CurrentDate) ; "." ; "." ) & ".pdf"

I used

Case (

Get ( SystemDrive ) = "/MacintoshHD/" ; "file:/Macintosh%20HD/Users/xxxxx/" ;

Get ( SystemDrive ) = "/Clint/" ; "file:/Clint/Users/yyyyy/"

)

&

"Documents/Krakatoa/Le%20Petit%20Globe/contrats/2012"

& Events::Summary & Substitute ( Get ( CurrentDate) ; "." ; "." ) & ".pdf"

And that did the trick.

  • 3 months later...
Posted

Actually I am finding this formula extremely temperamental. It works once or twice then stops, giving error messages. Does anyone know where you find rules on how to formulate the variable that can specify the name and destination folder so that it can be applied in the "save records as pdf" script step? Or maybe upload an example.

Posted

Does anyone know where you find rules on how to formulate the variable that can specify the name and destination folder so that it can be applied in the "save records as pdf" script step?

http://www.filemaker.com/12help/html/create_db.8.39.html#1030283

This topic is 4434 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.