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.

Link to a folder and not a file

Featured Replies

Hi all,

Is there a way i can link a folder to a container field and not just a file?

Thank you very much for your help

Paul

What are you wanting to do with this information? Search by folder?

If so, you can do this in a file path.

Lee

  • Author

thank you for your replies.

I have a database of patients, for every patient there is one folder containing his pictures and another for his videos (like surgeries and likewise). I am searching for a way to link every patient i have in FMPro to his folders that i have on my hard disk.

I would appreciate any help

Paul

You can get the file path for "[color:blue]Stored only as a reference" files by using the GetAs (Text) Function on a Container field. It would look like GetAs (YourPhotoField)

This will provide you with three lines of data

Size, or dimensions

relative file path

absolute file path

From this, you might be able to work with the folder information.

HTH

Lee

The simplest method, if you just have the path to the folder (which you should be able to calculate somehow)* is to use the OpenURL script step (just a single step attached to a button will do). The syntax of the path looks like this:

file://localhost/Users/fej/Documents/FileMaker/My_FM/FM%209/

I'm running on Mac (right now), but I believe it will work the same on Windows. The path must be "url encoded", hence the "%20" for a space. It is not a "FileMaker" syntax path, nor protocol. You could type the same path in your web browser and it would open the folder.

The "/" at the end is optional. It will still open it without it. The "localhost" is also optional; you could just use another "/", ie., "file:///" (at least on Mac).

* I'm assuming here that your folder structure is organized by patient name, with consistent and predictable folder names. If that is not true, then use Lee's advice to Insert a single file (as [x] Reference only) from the top level of the patient's folder. Then parse out the path from the last line. In this case you could just leave the Drive name in the path, as that is also supported.

Let ( [

Info = GetAsText ( Contain );

cnt = ValueCount ( Info);

fm_path = GetValue ( Info; cnt )

];

Substitute ( fm_path; ["filemac:"; "file:/"]; [" "; "%20"] )

)

Edited by Guest

  • Author

Guys you are all so wonderful

Fenton I applied what you told me to do,with the instructions of Lee and it worked like charm. Since Im gonna have a well structured database Im gonna keep it as simple as OpenUrl script step.

Thank you so much guys. You are really doing a great job.

Paul

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.