2 Replies Latest reply on Feb 16, 2012 8:25 AM by TSGal

    Calculations

    RichardStephenson

      Summary

      Calculations

      Product

      FileMaker Go

      Version

      Go_iPad 1.2.4

      Operating system version

      iOS 5.0.1

      Description of the issue

      I have a table that calculates the number of gallons of fuel used for each motor home owned. The calculation "If ((GetNthRecord(MotorHomeID; Get(RecordNumber) - 1) = MotorHomeID); (GetNthRecord(NumberOfGallonsToDate; Get(RecordNumber) - 1) + NumberOfGallons); NumberOfGallons)" works well in FileMaker Pro Advanced 11 when the "Do not store calculation results -- recalculate when needed" is set. However, in FileMaker Go, it stops working after about 92 records and does not do the calculation. When I removed the checkmark for "Do not store..." it works on both platforms.

      Steps to reproduce the problem

      Populate the table with records (fuel purchases).

      Expected result

      The number of gallons of fuel to date should calculate correctly.  I researched this issue and there is no best practice on how to perform a calculation like this and whether this is supported in FileMaker Go.  I also wanted the flexibility if a user went back and corrected an amount from a prior record, the ongoing calculation would pick it up.  When I removed the checkmark for "Do not store..." in FileMaker Pro Advanced 11, it did not function that way.

      Actual result

      The prior record (record number 92) calculates correctly, the next record contains a ? in the number of gallons to date field

      Exact text of any error message(s) that appear

      No error message

      Workaround

      Removing the checkmark for "Do not store..."  causes it to work.

        • 1. Re: Calculations
          philmodjunk

          I think you have hit a recursion limit on GetNthRecord. As I understand it, the limit exists on all platforms but the limited RAM of an iOS device running Go will reach it much quicker than you will in FileMaker Pro.

          You'll need to consider a different approach such as setting up a calculation that can be summarized with a running total summary field instead of GetNthRecord.

          • 2. Re: Calculations
            TSGal

            Richard Stephenson:

            Thank you for your post, and I apologize for the late reply.

            This has been reported previously, and the explanation from PhilModJunk is correct (Thank you).  There simply isn't enough memory on iOS devices (at this time).  You can see a similar issue posted last year on the forum at:

            FM Go “GetNthRecoder” Bug

            One possible workaround is to use a script to accomplish the same result, possibly using an additional stored field.

            TSGal
            FileMaker, Inc.