Jump to content

Script not working


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

Recommended Posts

  • Newbies

Hello everybody,

I am trying to write a script to retrieve a pdf file from an external drive.

I am trying to use this command:

"file:/Users/alfredomarques/Desktop/Databases/PDF/" & Document Control::Document & ".pdf"

This not working and says that the file cannot be found. Even using filemac it doesn't work.

 

Any help on it, please?

 

Thank you very much in advance

Link to comment
Share on other sites

On 7/19/2021 at 11:00 AM, Makangsi said:

write a script to retrieve a pdf file from an external drive.

I am not sure what exactly "retrieve a pdf file" means. Also, a path that goes through a user's desktop does not seem to be on an external drive?

Anyway, the simple way to solve this is to insert the file into a container field (as reference only) and compare the resulting path with the path created by your calculation. Then, I suspect, you will discover that the path created by Filemaker has the drive's name before the /Users location step.

Note also that Filemaker has a function that returns the path to the desktop folder of the current user. If that's what you need in your situation, you could make your task simpler by making your calculation =

Get(DesktopPath) & "Databases/PDF/" &  Document Control::Document & ".pdf"

 

Edited by comment
Link to comment
Share on other sites

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