5 Replies Latest reply on Jul 27, 2016 11:06 AM by David Moyer

    Container repetitions vs separate fields...benefits and drawbacks?

    tkessler45

      I have a situation where I need to take between 2-5 photos for a given record. I can use repetitions in a single field, or just set up 5 separate fields. I'm not sure what the benefit of repetitions are? Ultimately the user would view the photo field(s) in a popover button and tapping each would insert from device in FileMaker Go, using an iPad camera to take the picture. I can do this with a small one- or two-line script that will work with either method. Logistically the use of separate fields sounds better, but I haven't used repetitions enough to understand any benefit they bring to the table. What are the benefits and drawbacks of this over the use of separate fields?

        • 1. Re: Container repetitions vs separate fields...benefits and drawbacks?
          Mike_Mitchell

          You haven't told us what you want to do with these pictures once they're entered. That will have an impact. However, in general, a separate table of individual photograph records is preferred for several reasons:

           

          1) You never have to worry about the customer coming in and saying, "Oh, we know we said we'd only ever need 5, but our business changed, and now we need up to 10."

           

          2) You can separate that table out into another file for external container storage, meaning backups and updates are much easier.

           

          3) You have a lot more flexibility in reporting.

           

          Now, there are some use cases where a repeating container is useful. For example, if you're inserting photos to use as icons in the solution, a repeating field in a single-record table is fine, addressed with the various repeating functions. Another would be if you need to be sure the image appears in a specified position on a layout. (Otherwise, you have to insert "dead" records to fill the gaps.) But in general, I would go with a separate table.

           

          HTH


          Mike

          1 of 1 people found this helpful
          • 2. Re: Container repetitions vs separate fields...benefits and drawbacks?
            philmodjunk

            Please note that Mike_Mitchell is recommending that you neither use repeating fields nor separate fields for this. He is recommending that you use separate records in a related table. And I agree that this is almost always the better option.

             

            Most experienced developers reserve the use of repeating fields only for a very short list of special cases. It's actually a hold over from when FileMaker was a flat file system way back before FileMaker 3.0.

            • 3. Re: Container repetitions vs separate fields...benefits and drawbacks?
              tkessler45

              Perfect. Sounds like repeating will be a burden in the long run. This is just to hold photos for later review or download if / when folks looking at the data need some details. There isn't anything special about them. I might go with a portal-based approach so the number wont be fixed. Again the images just need to be stored and then reviewed along with the data, and not manipulated or transferred. They'll ultimately be tossed after a length of time has passed (I guess a portal would be best for this, given that I can timestamp them and filter by that to remove as needed, and then just limit the number of portal rows displayed to limit the number of photos that can be taken to a max of 5).

              • 4. Re: Container repetitions vs separate fields...benefits and drawbacks?
                Mike_Mitchell

                Yes. This. Sorry if that wasn't clear.

                • 5. Re: Container repetitions vs separate fields...benefits and drawbacks?
                  David Moyer

                  Hi,

                  Mr. Phil is right - it is rare that you'd use repeating fields in most environments.  You can reach a fantastic number of "dimensions" with cascading parent-child relationships.

                  But, for formatting data, I present to you my toy as a demonstration of using repeating container fields ...

                  Surrender to Fun, with FileMaker