May 13, 201114 yr 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
May 13, 201114 yr I think the most robust method would be to uniquely name each image, then include the image names in the records.
May 13, 201114 yr 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
May 13, 201114 yr 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.
May 13, 201114 yr 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!
May 13, 201114 yr 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.
May 13, 201114 yr 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
May 13, 201114 yr 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.
May 14, 201114 yr 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
May 14, 201114 yr 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.
May 14, 201114 yr 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.
Create an account or sign in to comment