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

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

Recommended Posts

Posted

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

Posted

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

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

Lee

Posted

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

Posted

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

Posted (edited)

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
Posted

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

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