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.

Importing an image and matching it to data

Featured Replies

Hi Guys,

I have been racking my brain and searching for a solution, basically I need to import images into filemaker (reference only) and link them to data also imported via a .csv file.

This I have accomplished however, initially I made the relationship through the image name which worked fine until there were multiple images with the same name.

Then I thought if I created a field in the .csv with the image path on the server I could do it that way and use 'GetAsText (picture)' to match it, the problem I found is that it still only grabs the file name at the end.

GetAsText (picture) returns with "M:/2011/Pre-Production/Jones/Raws/STAFF-A10049.JPG"

The .csv imported has "M:\2011\Pre-Production\Thomson\Raws\STAFF-A10049.JPG"

All the other fields in the .csv are correct, is there a way perhaps to isolate the "Thomson" in the path which is also the client name in the .csv field?

Any help is appreciated as this is driving me nuts!

Thanks

Samantha

I think the most robust method would be to uniquely name each image, then include the image names in the records.

  • Author

Thanks Vaughan, however we deal with over a million images annually so that simply isn't an option, the only thing unique is the location of each batch which is why I thought utilizing the image path on the server. Thanks Samantha

If the data imported from the .csv includes the path to the correct image, you could add a calculation field to the same table, with the result type set to Container. This would display the image directly from its location, and you would not need to import the images into another table.

GetAsText (picture) returns with "M:/2011/Pre-Production/Jones/Raws/STAFF-A10049.JPG"

That is not the exact result.

  • Author

Thanks, so basically use the path in the .csv to populate the container fields? Could you please show me an example, sorry im new to this and usually persist but this has had me stumped for days!

so basically use the path in the .csv to populate the container fields?

Yes - but you need to convert the Windows path to Filemaker path syntax. Please post an exact result of GetAsText ( YourContainerField ) and the corresponding path as imported from the .csv.

  • Author

This is the exact result...

image:/M:/2011/Pre-Production/Smith/Raw/7B-005814.JPG

This is the path in the .csv...

M:\2011\Pre-Production\Smith\Raw\7B-005814.JPG

Thanks

This is the exact result...

image:/M:/2011/Pre-Production/Smith/Raw/7B-005814.JPG

Are you sure about this? I would expect at least two lines in the result, one starting with "image:" and another with "imagewin:" - see:

http://www.filemaker.com/11help/html/create_db.8.32.html#1030283

Anyway, try a calculation field (result is Container) =

"image:/" & Substitute ( ImportedPath ; "\\" ; "/" )

Another option is to display the image in a web viewer. Drop one of the images into a browser and observe the path in the URL line; that's the syntax you'll need to convert your imported path to.

  • Author

Hi,

I have tried it both on a PC and a Mac with the same one line result...

My container field being 'picture'....GetAsText (picture)

returns...

image:/M:/2011/Pre-Production/Smith/Raw/7B-005814.JPG

I tried a few things which confused me a little.

1. Using the path in the data to reference the image, which worked however it wouldn't show a preview as it must not source as a reference file when doing it this way, is there a work around for this?

2. What I found strange and don't understand why is when I use the image path as the relationship, why does it only require the '7B-005814.JPG' to make the link and not the entire path, I can type anything before the name and it will reference the image, it's only when I alter the name it looses the link eg...

sdfsdfsdfsdfsdfsdfsdfsdfsddf/7B-005814.JPG

Thanks

Samantha

  • Author

Ignore number 1. Had a blond moment! It works fine, however seems really slow when browsing through when done this way, still curious about number 2.

when I use the image path as the relationship, why does it only require the '7B-005814.JPG' to make the link and not the entire path

It sounds like your field types are Number instead of Text.

seems really slow when browsing

I don't see why it should be any slower than your method. A container field with "reference only" holds only the path to the file - same as a calculated container.

  • Author

Thanks for all your help, works great and learnt a lot in the process.

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.