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

Hello,
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
N:\NPD\001\Documents

for projectID002 the folder will be
N:\NPD\002\Documents

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

N:\NPD\%projectID%\Documents

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!
LVL 1
jbla9028Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lesouefCommented:
syntax for logical units required only one /
file:/n:/folder.....
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.
0
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
0
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

jvaldesCommented:
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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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\




0
jvaldesCommented:
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.
0
jbla9028Author Commented:
Ok,

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

Thanks!
0
lesouefCommented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FileMaker Pro

From novice to tech pro — start learning today.