5 Replies Latest reply on Dec 8, 2008 9:21 PM by rayce

    Help on a Calculation



      Help on a Calculation




      I have a new problem on creating a report on filemaker.


      I have a file that has repeating fields in it, and I need to get a report from it. So what I did is to import and separate the repeating fields. But doing so I encountered a problem.


      In my original file there is a computation on one of the fields that is repeating. It's a calculation of numbers.

      So when I separated repeating fields what happened was the computation was also distributed. So the output of the computation is now different. How can I get the summation of the field from the original file to retain on all the separated records?



      Thank you. Any response is welcome.

        • 1. Re: Help on a Calculation

          Hi rayce


          Thanks for the post, it may help us get a better understanding of what you need if you give more details on the report you are trying to create and how your calculation is setup and where exactly it is going wrong.


          • 2. Re: Help on a Calculation



            Thank you for your post.


            It sounds like your calculation is performing a Sum or Count of a repeating field.  This would definitely give you different results when you separate the repeating fields, because the summary would only be calculating over one repeated value instead of several.


            Prior to the export, put the Summary value into Number field via a script.  That way, when you split the records, the new value will be in the Number field.


            Run the script:


            Replace Field Contents (NumberField; Summary calculation field)



            FileMaker, Inc. 

            • 3. Re: Help on a Calculation



              Thanks for your reply,



              I will try what you just said. And I will tell you what happened. Also, is it possible to create a script that would automatically import records and split the repeating fields and match matching names and show it in a specific layout in just one click of a button?



              • 4. Re: Help on a Calculation



                Yes, this is possible.  In your script, have:


                Go to Layout [<layout with second table fields> ]

                Import Records [no dialog; <specify data source>; <specify import order> ]


                Then, you can create a button and set the button to execute this script.


                I am assuming you will be running this script a number of times, so before the "Import Records" step, you may want to insert:


                Show All Records

                Delete All Records [no dialog]


                That way, you remove all records before importing.



                FileMaker, Inc. 

                • 5. Re: Help on a Calculation


                  Thanks for the reply,


                  Sorry, been away lately...

                  I will try your script...

                  I'll update you on the results...


                  Thank you so much!