3 Replies Latest reply on Apr 4, 2013 9:07 AM by philmodjunk

    Exporting Container Fields



      Exporting Container Fields




           Ok, so as part of the Filemaker application i have developed for the iPad, i take a number of pictures for every room i enter. I have 4 container fields per room, but don't always use every single one (some rooms i take no pictures, others i take 2, 3 or even 4).


           Is there a way of exporting all the container fields that have something in them to a .jpg or similar file format?

           The only way i can think of doing it is to collate them on a report layout and exporting as a .pdf (but that would leave many blank spaces where photographs weren't taken..)




        • 1. Re: Exporting Container Fields

               You might consider using a related table with one container field for each record in the related table. That allows you to store from 0 to as many pictures as you need for every room record--more flexible.

               You can use Export Field Contents to export files from container fields. You'll need to specify a file path and a file name for the export and include the correct file extension for the type of file being exported. In this case, since they are pictures taken with your iPad, .jpg should work. A script can loop through your records and fields, exporting each file in turn. The script for this will be a bit simpler with the related table instead of 4 container fields per room record.

               Note that the file path that you'd use to export the images on your iPad is likely different from what you might use in FileMaker Pro on your computer.

               You may find the tutorial file shared in this thread useful. It explores container fields and $Path variables that might be used when working with files in scripts: Exploring the use of a $Path Variable in Scripts

          • 2. Re: Exporting Container Fields

                 Thanks for the advice! is there anyway of taking that container field and associating a room name with it? i.e. if i take 2 photographs in an office, 1 in a stairwell and 1 in a reception; it would be ideal if i could keep the room name (or room ID) associated with the container field... does that make sense?

            • 3. Re: Exporting Container Fields

                   That's why I said to use a related table. The relationship would link the pictures taken in the pictures table to a specific record in your Rooms table.

                   Rooms-----< Photos
                   Rooms::__pkRoomID = Photos::_fkRoomID

                   A portal to Photos on your Rooms layout with "allow creation of records via this relationship" enabled for Photos is a typical way to set this up though it's not the only option.

                   For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained