I have a Mac filemaker pro16 database of objects with several text field. Is it possible to link, through a hyperlink, a field to a photo stored in an external folder on the same computer? If yes, how?
Not sure if you are referring to storing the external file address in a field and then clicking to open the file? If yes then you can do it with a button (or some other trigger) and a 2 step script:
It is possible to create a calculated field which will display the photos you have. Make the calculation have a type of "Container." If you're in a mixed OS environment, then use a Case statement to detect which path format you'll need. If you're in a single-OS environment, find out what Get ( DocumentsPath ) shows you, then use that as the format for generating the path for your calculation.
Thank you very much. Your answer is just what I'm looking for. But I have a problem: I'm not used to manage scripts. So I have been unable to apply your instructions. I wouldn't abuse your patience but an example could be useful to me. If I have on my desktop a file "image.pdf" or "image.jpeg" managed with "Preview" program, what have I to do to link a text field of my filemaker database to a specific image stored in a folder of images.
In a database on my Mac, I used a very simple script:
Set Variable $Desktop = Get ( DesktopPath )
Show Custom Dialog = "The path is: " & $Desktop
That'll show you the format for paths on your system. On my Mac, it shows: "/Macintosh HD/Users/danjohnson/Desktop/" Let's say I know that the filename is stored in a field called "FileName".
My calculation for my container display field would be something like:
"imagemac:/Macintosh HD/Users/danjohnson/Desktop/" & Table::FileName
The container field would then display the image (if one with that filename existed). Hope that helps.
The structure of the Send Event script that I posted was for windows, if you are on a mac then it will be slightly different. The path you need will also be a bit different. You may need to add 'filemac:/' to the beginning of your $path variable. Have a look at these help files:
Filemaker Help - Send Event
Filemaker Help - Creating File Paths
I'm trying to figure out how to use your instructions in Macintosh environment. Unfortunately, I have not succeeded so far.
Your suggestion doesn't work. I'm afraid you're referring to a different version of Filemaker from mine. I have Filemaker Pro 126.96.36.1990.
Are you able to share what a typical file path that is stored in the field looks like? Just change the directory names to something generic if security is a concern. Also, if you could post what the $variable paths that you have tried look like.
The path in the field does need to be a valid path. dtcgnet has posted some ways to determine what the path should look like.
It works. I did it on my machine before posting it. I'm using FileMaker Pro Advanced, v. 188.8.131.520.
WHAT doesn't work? Do you have Advanced so you can use a debugger?
When I try to insert the path of a file I see the message: "you cannot use the selected name because it contains /". But how can I give a path without /?
I afraid that I have some basic deficiencies and you are waiting your time with me.
For example, You cannot combine variable and other text:
Set the variable and use it:
Set Variable ( $thisPath ; $myPath & "/filename.jpg" )
The dialog is not a calc engine to know I’m concatenating a variable and text, so now I can use just the variable
Because it will resolve it.
Is your path incorrect because you are mixing variable and text?
Sent from miPhone
Retrieving data ...