6 Replies Latest reply on Jun 20, 2012 12:21 AM by flemke

    Container - Embedding images previously stored as links

    flemke

      Hello,

       

      I have the following problem: I designed a db with containers holding links to image files. Now, I want to transfer my db to Filemaker GO, but unfortunately, I cannot transfer the external images as well (since the file sturcture on the iPad is not accessible and I cannot transfer my images with the app) -> Or can I...?

      The only way I see is to embed my external images in the database, well knowing, that this will slow things down. :-/

       

      Is there a way to convert all links in my db to embedded images (like an "import" of all referenced images files into the db)?

       

       

      Thanks in advance

       

       

      Frank

        • 1. Re: Container - Embedding images previously stored as links
          Malcolm

          I have the following problem: I designed a db with containers holding links to image files. Now, I want to transfer my db to Filemaker GO, but unfortunately, I cannot transfer the external images as well (since the file sturcture on the iPad is not accessible and I cannot transfer my images with the app) -> Or can I...?

           

          The only way I see is to embed my external images in the database, well knowing, that this will slow things down. 

           

           

          Yes, put them into the database. Your graphics should be relatively small in size, so they won't contribute much to file bloat. The only issue that I have discovered is that you get a performance hit when your graphics are stored in global fields in a related table. (This is on the WAN). For the best results, the graphics must be stored in the "current" table.

           

          Malcolm

          • 2. Re: Container - Embedding images previously stored as links
            flemke

            Hi Malcolm,

             

            This is the popint: How do I convert the links to external files in my db into embedded objects? I added all images with the option "Save as link only", and I would like to avoid to have to add them again manually.

             

            Kind regards

             

             

            Frank

            • 3. Re: Container - Embedding images previously stored as links
              mpjozef

              1. create calculated field for example "c_link_to_picture_info~~t" with calculation "GetAsText ( link_to_picture~~c )" (link_to_picture~~c is field where is stored picture as a link)


              2. in field "c_link_to_picture_info~~t" you'll see information about the picture

                  for example:

                        size:640,626

                        image:1384km.jpg

                        imagemac:/iMac HD/Users/dodo/Desktop/1384km.jpg

               

              3. create script, in script create loop through records, in loop set variable " $path_to_picture" with command:

                   "Set Variable [ $path_to_picture; Value:GetValue ( pictures::c_link_to_picture_info~~t ; 3 ) ]"

              in this variable will be stored path to linked picture

               

              4. now you can insert image with commands

                   Go to Field [ pictures::picture~~c ]

                   Insert Picture [ “$path_to_picture” ]

               

               

              please see to attached file for example


              • 4. Re: Container - Embedding images previously stored as links
                flemke

                Yes!!!    Thanks a lot for the quick reply.

                • 5. Re: Container - Embedding images previously stored as links
                  DrewTenenholz

                  Frank --

                   

                  The engineers at FileMaker made some pretty smart decisions about converting container fields.  At first, I thought I needed to write the script mpjozef suggested, but after talking with my local service engineer, it is much easier.

                   

                  For a stand-alone file, in other words, a file that you wrote yourself and did not distribute to other customers, so there is only one real copy of the file, simply change the field options for your container under 'Storage' to 'Store data externally'.  When you exit the Manage Database window, you will be prompted to convert/move the container data.  FileMaker Pro/FileMaker Server will take care of the data transfer for you. 

                   

                  Really, that's all you need to do.  If the amount of referenced data is very large, and stored on another machine, the transfer can take a long time, so plan ahead on when & where you decide to say OK to the transfer (and you can postpone the transfer even as you change the field options).

                   

                   

                  If you decide you need to keep the old field and create a new managed storage container field, then you can transfer the referenced container data to the new field in much the way mpjozef described EXCEPT you don't need to do any work to parse out the file path.  Two script steps suffice:

                   

                  Set Variable ($path ; referenced_container_field)

                  Insert File ( Target_field ; Options ; Source_File = $path )

                   

                  FMPro is smart enough to find the necessary path info from the existing field and move the file for you.

                   

                  -- Drew Tenenholz

                  1 of 1 people found this helpful
                  • 6. Re: Container - Embedding images previously stored as links
                    flemke

                    Hey Drew,

                     

                    it gets better and better... Thanks!