1 2 Previous Next 16 Replies Latest reply on May 29, 2009 3:24 PM by philmodjunk

    Importing Pictures



      Importing Pictures




      I am having a bit of problem importing pictures into my database, any help would be much appreciated.  I have an asset view set up with an "Insert Picture" button etc etc that works fine.  However, it's not pratical for me to insert each picture manually (working with 1000's of pieces rescue equipment that is getting entered into inventory).  I want to be able to import the pictures using their file names <<barcode#>>.jpg and match this to their existing record.

      When I use the Import Records, Folder, and match the correct data it doesn't work.

      Any thoughts?



        • 1. Re: Importing Pictures
             It should work, if the records are in the found set when you import, and if a text field in FileMaker has exactly the same file name. And (obviously) if the image is brought into a Container field. I can't think what else could be wrong.
          • 2. Re: Importing Pictures



            Thank you for your post.


            Echoing what "Fenton Jones" said, "It should work".


            With you saying it doesn't work, it may help us if you explain in greater detail what isn't working.  That is, are you getting an error message?  Does it lock up?  Is the wrong information going to the wrong record?  Is only one picture being imported?  Any additional information you can provide may help narrow the possible causes.



            FileMaker, Inc.

            • 3. Re: Importing Pictures

              I import the folder, match filename with barcode (picture filenames are the barcode #) and import the image into the picture container.


              If I set it to update matched records, nothing imports.


              If I set it to update existing records, it adds the pictures but to just the first records it comes across (not matching the pic filename to the barcode number).  All the barcode numbers in my db getting changed.


              Note: I don't have the same amount of pictures as I do records, as many use the same picture (will do that manually) and others we don't have pictures of.


              I am going to try to reverse the import order (import the pictures, then the excel record data)... see if that works.

              • 4. Re: Importing Pictures

                I am pretty sure the problem is that it the database is including the file extension in the matching.  Example 10001.jpg picture does not match barcode 10001. 

                Is there a way around this?



                • 5. Re: Importing Pictures

                  You might want to import your images into a separate table. Then you can either define a calculation field that strips off your file extensions or use "replace field contents" to simply strip them out of the file name field. Then you can define a relationship that links your current records to the appropriate image record.


                  Incidentally, this approach allows you to match one image record to multiple records in your current table. That might make that part of your task easier as well.

                  • 6. Re: Importing Pictures

                    I am trying this, however I am running into a problem.

                    Our barcodes are alphanumerica (ie. TF2E0000001).  So when I perform a calculation, I have to set the result to be either text, number, date etc.  If I set it as text, it strips the numbers, if I set it as number, it strips the text.


                    Am I pretty much going to have to settle with inputting each picture manually?

                    • 7. Re: Importing Pictures

                      "If I set it as text, it strips the numbers"


                      If you import into a text field and set your calculation to return type text, both numbers and letters should be returned.

                      • 8. Re: Importing Pictures

                        Sorry , it's actually the opposite.  If I set the result as text, I only get numbers.



                        File Name - FS4P8760031.jpg

                        File Name no ext - 48760031


                        My calculation is file name - ".jpg"  - should I use something else?

                        • 9. Re: Importing Pictures

                          I'm afraid your mistaken.


                          The result you post only happens if you haven't clicked the check box to make the result of "type text" when you define the calculation.


                          Please post an example of your calculation definition so we can see why it would not work this way.

                          • 10. Re: Importing Pictures


                            File Name (text)

                            File Name ext (calculation) = file name - ".jpg"

                            Picture (container)



                            This calculation removes all letters from the File Name field.

                            For example... I have

                            file name = FS5C2340014.jpg

                            file name ext = 52340014


                            I tried to add some screenshots to this post so you could see, but I don't think you can.

                            • 11. Re: Importing Pictures

                              Put the following expression in a calculation field's definition:


                              Left(FilenameField, Position(file name, ".") -1)


                              Select text from the "calculation result is" menu in the bottom left corner.


                              Then, when FS5C2340014.jpg is in file name, FS5C2340014 will be returned in your calculation field.

                              • 12. Re: Importing Pictures

                                craig5005 wrote:


                                File Name ext (calculation) = file name - ".jpg"

                                The minus ( - ) symbol isn't a text operator... it is a numeric operator, so filemaker evaluates that calculation like:


                                GetAsNumber ( File name )

                                • 13. Re: Importing Pictures

                                  PhilModJunk wrote:


                                  Left(FilenameField, Position(file name, ".") -1)


                                  Left ( File name ; Position ( File name ; "." ; 1 ; 1 ) - 1 )

                                  • 14. Re: Importing Pictures

                                    Thanks Raybaudi,


                                    I originally used "filenamefield" throughout my example and then went back and edited it to use "file name" to match the previous post, but missed that one. :smileywink:

                                    1 2 Previous Next