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.

Featured Replies

hi all, i am terribly new to filemaker so my apologies for the easy question, but here goes:

I have a database with one of the fields being a four-letter code that associates with a plant species.

i have two images for each species, whose filenames are the value of the code field with a 1 or a 2 appended, eg for the record with Code "BIBE" i have BIBE1.jpg and BIBE2.jpg

I would like these images to remain external to the database file and need them to appear in each record.

I have a calculation field with output set to container with the following calculation:

"file:"&Code&"1.jpg"

all that shows up with this is a missing image picture, with the correct filename below it.

the jpg's are in the same folder as the database, although i am considering moving them to /img/

any help would be appreciated!

Edited by Guest

Very close. You would need the full path to the file. As you say, your images are loose in the same folder as the FM file (which you should probably change to the subfolder idea);)

For your first image, in field Image1, calc, result container:

"imagewin:" & Get (Filemakerpath) & table:Code & "1.jpg"

or

"imagemac:" & Get (Filemakerpath) & table:Code & "1.jpg"

The easiest way to see the actual path is to insert one manually as a reference, and view the container field as text. It'll have the full path as the second value.

Edited by Guest

  • Author

thanks for your reply, i will have to try this tomorrow when i am back at work.

would this work on a server? i have FM server 10 advanced and plan on hosting the database through that, but i am testing the database on my pc for now, so i will eventually move all of these files there.

also, if the server is running windows and is hosting the db via IWP, PHP etc would it still work? even if a mac user visited the site or remotely opened the file?

thanks again!

  • Author

"imagewin:" & Get (Filemakerpath) & table:Code & "1.jpg"

this doesn't work for me because it points to the directory that filemaker is installed in. my database isn't in that folder, is there a way to reference a folder that is relative to the database file? i see the Get(FilePath) function but it's path includes the actual filename (in this case WMI.fp7) is there a way to truncate this path by the 7 characters needed to be removed?

Let( [filepath = Get(FilePath);

imagename = "yourimagename.jpg"];

Substitute( Left( filepath ; Position ( filepath ; "/" ;0 ; PatternCount (filepath ; "/" ) ) ) ; "file:" ; "imagewin:" ) & imagename

)

Replace yourimagename.jpg with whatever the filename is or whatever calc you use to establish the filepath

  • Author

awesome! thank you very much, worked like a charm. now to try to decipher it so i can understand how it works lol

You're welcome :

Look at the documentation for the following functions individually:

Position -> Determines location of a particular occurrence of a particular character in a string or part of a string.

PatternCount -> Determines total number of a particular character in a string

Substitute -> Replaces specified text in a string with another piece of text.

You can go without the let though all it does is essentially sets temporary values to be references in the calculation.

Edited by Guest

"also, if the server is running windows and is hosting the db via IWP, PHP etc would it still work? even if a mac user visited the site or remotely opened the file?"

You would need to store the image files on the web server, and store the url reference to the image in the record. Then php would use the url to display the image.

  • Author

just how do i do that? i have uploaded the database and all of the images to the server and the references to the images are stored as:

"imagewin:/C:/Users/GIS4/Desktop/filemaker pro files/WMI/img/BRSC1.jpg"

how do i make the server able to display the images through network sharing, IWP, etc?

Also, read pp. 19-20 in http://www.filemaker.com/downloads/pdf/fms10_cwp_php_en.pdf

  • Author

thanks again guys!

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.