4 Replies Latest reply on Jan 22, 2013 1:53 PM by philmodjunk

    Automatically adding images to records



      Automatically adding images to records

      Your post

           Hello, we have an inventory of over 100,000 unique items so manually adding a picture for each item is very impractical. We have a set of pictures that have the same filename as the item's item number. Is there a way I can have a script add pictures based on the filename matching the item number?

        • 1. Re: Automatically adding images to records

               This would not seem to be a question about FileMaker Server. DId you post here by mistake instead of posting to the FM Pro Forum? (See tabs at top of screen.)

               Not a big deal really, but you probably would have seen an answer by now had you posted there.

               A simple way to get what you need, assuming that you have perfectly matching file name:

               Add a new table to your database with one container field in each record and a text field for the image's file name. Link this file name to your inventory table's item number field. (You may need to use a calculation field in this new table that removes the file extension instread of the filename field to get a perfect match.) Then use import records | Folder to import all your images from a common folder. This import method allows you to select your filename field to receive the file name of the imported image so that this import both pulls in all of your images and links them to your inventory records all in one operation.

          • 2. Re: Automatically adding images to records

                 Right, I never said! The reason I posted in the server forum is that the inventory file is being hosted on a server and I want to make sure that users remotely connecting can also see the pictures. I did write an applescript that would make the files show up locally, but the image container would still be empty for remote users.

            • 3. Re: Automatically adding images to records

                   Thank you, I just tried this and it seems to work locally at least. There is a problem though, the filenames are not perfect matches to the item numbers. The file will be named, for example, 8372.jpg but in our inventory we would have entries like 8372LG, 8372MD, and 8372XXL as the item numbers, where the letters represent the different sizes of the item. 

              • 4. Re: Automatically adding images to records

                     Calculation fields can be defined that strip out the non-numeric characters and thus can be used as match fields to match the correct product to the correct image record.

                     Filter ( Field ; 9876543210 )

                     for example would return only the digits 0 through 9.