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

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

Recommended Posts

Posted

I want to use Open URL to open a pdf file. It works fine if I use the complete, absolute path name. But it fails when I try to use a relative path name. I want a relative path name because the pdf will be a help file in a runtime solution.

I want to have the pdf file in the same folder as the database. Can someone tell me the correct expression for this.

Posted

I think you meant Get (FilePath) not Get (FileName).

In any case Get (FilePath) returns the absolute file path. I already can get that to work. What I want is to be able to use the relative file path.

Perhaps there an issue with Open URL and relative file paths?

Posted

I think Mr. Drucker's thought was that since the Filemaker function is returning (giving you) the full path why do you need the relative path?

Posted

You need both the absolute path to where you are, calculating the folder path from the file path. Then add the relative path from there. The first is where you "start from", the 2nd is where you "go to". In the end, yes, you have an absolute path. The URL paths you may be used to work as relative paths only because they know where they are starting from in the first place.

Posted

The pdf file will be a users guide for a runtime solution I am developing. I want to put the user guide pdf file in the same folder with the runtime solution so it will work on any computer it's installed on and even if the customer moves the runtime folder, the script will still be able to find the pdf file.

That's why I want to use a relative path. I don't know if Open URL is the way to do what I want. Any suggestions would be welcome.

Posted

Open URL is a great way to do it. But you need a calculation to convert the FileMaker file's local path into its folder path, then add the relative folder path. See example file (with a Pictures folder, but you get the idea).

Open_File_wURL.zip

  • 3 weeks later...

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