Jump 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.

Open URL and relative path name

Featured Replies

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.

I think get(filename) will give you what you need. Returns the path to the current FileMaker file... based on that, you should know where your PDF is.

Hope that helps.

James

  • Author

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?

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?

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.

  • Author

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.

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...

Very nice solution. Now, how to make it work in Windows 7.

Create an account or sign in to comment

Important Information

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

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.