3 Replies Latest reply on Dec 8, 2011 11:13 AM by philmodjunk

    how to import pictures from folder to photo field

    BobEpine

      Title

      how to import pictures from folder to photo field

      Post

       Hi,

      Got filemaker pro advance 11 and a database of students info that I would like to import their specific picture from a folder that has their pictures named by ID ex: 123456789.bmp so user 123456789 get picture 123456789.bmp.

      since there is more that 1000 users, I dont want to add manually each pictures.

      There must be an easy way to do this ?

      Any help would be greatly appreciated.

      Thanks.

        • 1. Re: how to import pictures from folder to photo field
          philmodjunk

          Use Import Records | folder to import all picture files in a folder into a table of container fields. When you do this, you can specify that a text field receive the filename--from which you can use the ID number in the file name to link this record to your existing table by the person's ID number.

          • 2. Re: how to import pictures from folder to photo field
            BobEpine
            Thank you for the quick answer PhilModJunk,
             
            Since I'm new to this, I dont understand all what you said. and need more detailed explanation on how to do that.
             
            When I do file-import records-folder.. , I specify the pictures location and under File Type, I let the default value of "Picture and Movie files" with Import only a reference.
            after the scan is completed, I get the Import Field Mapping, so if I follow your instructions, this is where I am supposed to select to import File Name fron source file to the "filename" Target field I just created.
             after this point I dont know how to "use the ID number...as you mentionned" ? I need detailed procedures please.
            • 3. Re: how to import pictures from folder to photo field
              philmodjunk

              My original recommendation was to import into a new table with just three fields: The container field, the filename, and then a calculation field that uses the file name but with the 4 character file extension removed so that it matches to the ID number in your current table.

              If all of the image files have the same file extension (such as .bmp in your example above), you can do this without the extra table.

              Add a calculation field, cFileName, to your existing table and define it as:

              YourIDFieldname & ".bmp"

              specify text as the return type.

              Now, show all records in your current table and use the Update Matching records option. Specify a match between cFileName and FileName for your import.

              If that doesn't work, or not all file names end in .bmp, please post back with a description of what happened. (I haven't tried this exact combination of steps, so we may hit a glitch with the import matching records option.) And I'll describe the second, related table option in more detail.