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.

Using calculation field to display images

Featured Replies

  • Newbies

Hi everybody,

I am new to Filemaker and currently struggling to set up a calculation field to display photo based on the photo link from another field.

The database I am working on containing over 100,000 jpegs and each record has a photo as proof of service. Manually importing those photos would take several month to complete. I have 2 photo fields:

Field A contain the link or path to the location of a photo stored on my hard disk. This information is imported from Excel data spreadsheet.

Field B is set to display the photo according to the link from field A.

Example from the field A :C:photosMay2010IMG_2121.jpg

Working out the calculation for field B to display the photo from field A is beyond my current ability.

I hope some experts in this forum can help me to work out the needed calculation for field B so all photos can be displayed once the data from field A are imported.

I am using FM Pro Advanced 11 on Win XP.

Thanks in advance

Field_B should be defined as a container field type to hold the image contents, if it is not already defined as such.

A script will likely be needed to achieve this. Script should loop through all records and insert the image into the container field. A local variable can be used to store the path, which will need to be prefixed with "image:/ e.g. "image:/C:/red_flowers.jpg".

Container data can either be stored as a reference (where it is fetched from the local hard drive) or in the actual Filemaker database, where it can tend to take up a lot of space. I prefer reference storage, but its downside is that if file is deleted from hard drive or in wrong folder, image won't appear. Also when DB is copied to another computer, image folder must be copied also, if reference storage is used.

The second option is to use a webviewer to view the data. An example is attached. It assumes the flower images are present in C: root.

Photo_Example.zip

Try making Field B a Calculation field (result type is Container) =


"imagewin:/" & Substitute ( Field A ; "" ; "/" )

Manually importing those photos would take several month to complete.

You could import them all at once:

file:///Applications/FileMaker%20Pro%2011%20Advanced/FileMaker%20Pro%20Advanced.app/Contents/Resources/English.lproj/FileMaker%20Pro%20Help/html/import_export.16.16.html#1044791

But using a calculated path is probably better in your situation. If you ever move the images, you can change the calculation to follow.

  • Author
  • Newbies

Thanks for both solutions and I will give them a go to see if the problem can be resolved. Really appreciate any help from your 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.