filemaker- button that will open a folder on a share drive depending on a field value

I'm trying to setup a form that looks like a folder stucture. There are pictures on the form that will be programmed as buttons. When the user clicks on the picture/button, I want filemaker to open up a folder on the shared drive. The only tricky part is that the folder that is opened will depend on a value that is in a field.
each record is for a project number (ProjectID), depending on the project number will determine which folder to open.
for projectID001 the folder will be

for projectID002 the folder will be

so basically I need a variable so that the folder name is dynamic with whatever record the user is on


I've tried this:
Created the button and set the button to open a hyperlink
Specified the value of the hyper link to be: "File://N:/" + PexData::ProjectID but it just returns a value of 1.

Any help would be appreciated to make it so I can add this feature to my DB!
Who is Participating?
jvaldesConnect With a Mentor Commented:
Open URL ("file://"&Right ( $path ; Length ( $path )-2))

This works for windows only, let me know if you need MAC, it is much more complicated as you have to initiate an applescript to do it so that it is reliable.
syntax for logical units required only one /
then it depends what you want to do, import a file, place an image, or browse the folder using explorer.
using a URL can also be used but this is easier using the web viever.
jbla9028Author Commented:
so what would the web address be? I tried even the web viewer and I get page cannot be displayed. It's trying to open up the url "1"

this is what I put in for a web address
"file:/n:/" + PexData::ProjectID
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

jbla9028Author Commented:
I'm on windows but say I neeed the path to incorporate the information stored in a field would it be

the folder I'm trying to open would be

N:\ PexData::ProjectID\

The string I posted works best if you don't use drive aliases, we found that to be too much trouble in a mixed system environment where not all computers can be given a fixed network unit. For a shared folder you would provide a path that follows the \\computername\foldername convention.

That should work for you.
jbla9028Author Commented:

Looks like that did it. I had to change the syntax a little bit

"File://united.local/UNITED-FS1/NPD/"&Right ( PexData::ProjectID ; Length ( PexData::ProjectID ))

I agree the UNC convention is far better, trying to connect to a missing logical drive freezes fm for a while if not mounted yet while the UNC will return immediately if not found except when using linked images. On top, Vista and w7 tend to unmount logical drives when they have not been used for a while.
with a slight modification, you can also use this system on a mac if the volume is shared via SMB or AppleshareIP by mounting the volume with an applescript as jvaldes mentionned.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.