6 Replies Latest reply on Jun 15, 2017 1:25 PM by vincer

    container repeating container calculated field

    vincer

      Should be easy but I can't solve...

      TableA_Field_A and TableB_Field_B are container repeating fields (25 repetitions).

       

      If I set TableA_Field_A as calculated field:

      TableA_Field_A (25 repetitions) = TableB_Field_B (25 repetitions)

      I obtain all repetitions of TableA_Field_A filled with the content of TableB_Field_B, but it is unstored.

       

      If I set TableA_Field_A as a stored field with auto-enter calculation using the same formula only the first repetition is copied.

       

      Many thanks for your help,

      Vince

        • 1. Re: container repeating container calculated field
          philmodjunk

          You have other problems as well.

           

          The calculation must be unstored because the other field is in a related table. You may find a way to get your auto-enter calculation to work, but the only data that you'll see will be the data present in the related record from Table B at the time you created the record in Table A. Subsequent updates of the data in B won't show in A.

           

          Any particular reason why you are using repeating fields? And then want to copy this data to a record in another table?

           

          Use of repeating fields is often not the optimum design in a FileMaker solution.

          • 2. Re: container repeating container calculated field
            vincer

            Table_A has only one record with stored shapes into container fields while Table_B has multiple records.

            In Table_B I need to show 500 randomly calculated contents of Table_A (so in Table_B I have 20 repeating calculated container fields of 25 repetitions each)

            The need of copying container contents from A to B is that in B I need the calculation to be stored, so that in B I have fields calculating how many time a specific shape is represented using

            PatternCount(

            GetAsText (FIELD1) &

            GetAsText (FIELD2) &

            GetAsText (FIELD3 &..... ETC);

            Extend (ShapeChoosen))

            • 3. Re: container repeating container calculated field
              philmodjunk

              But that does not require that you copy the container field contents nor does it require a repeating field. There are other options and copying the data is not necessary for the scenario you describe, you can link to the related record and use fields from the related record on your layout.

              • 4. Re: container repeating container calculated field
                vincer

                The related record in Table_A has one sample of each shape (total of 25 different shapes).

                The records in Table_B need to show a total of 500 randomly generated from the 25 samples.

                It needs to be stored because it is a testing procedure and I need to save the testing output along with the student results.

                • 5. Re: container repeating container calculated field
                  philmodjunk

                  I need to save the testing output

                  Does that mean that the data in your table A records may change in the future? Otherwise you have the data already saved in A.

                   

                  I've been able to reproduce the same behavior you report and haven't found a field option based alternative. You could script the look up, or replace your repeating fields with tables of related records. The images selected for a given Table B record would then be a join table linking the two tables with one related record to an image. There are ways to display a set of 25 related record horizontally. You'd have to test performance on that, but on paper, it can be made to work.

                  • 6. Re: container repeating container calculated field
                    vincer

                    Phil,

                    yes, I am using a script like this:

                    Set Variable [$loop; value: 0]

                    Loop

                         Set Variable [$loop; value: $loop + 1]

                         Set Fiels [Table_B::ShapeChoosen] ; GetRepetition (Table_A:Shape; $loop]

                         Exit Loop If [$loop = Table_A::$loop = Table_A:MaxRepetitions]

                    End Loop

                    Commit Records/Requests

                     

                    It works. I was checking if there is an alternative method for having Table_B::ShapeChoosen as a auto-enter calculation field instead of using a script.