Even in FileMaker Pro, there is a limit to how many records you can have in your found set with such a chain of GetNthRecord function calls reaches an internal storage limit due to the recursion involved. The limited hardware resources of an iOS device simply mean that you reach this limit more quickly.
But there are other ways to display a starting balance, running balance and Ending balance that do not require using this function. The same may be accomplished with summary fields and then you should not bang your head on this "ceiling".
I sure would not "bang" my head if I had other options. Can you lead me to one?
A summary field can compute a running total of your mileage field. The "Starting balance" could be just the miles entered for a special first record. There are also ways to enter that starting balance in a global field or field from a related table and then you can include a calculation field that adds the running total summary field to starting balance. This second option is useful if you want to pull up small groups of records with a starting balance that is different depending on what group of records you pull up in your found set.
I often see this issue on Windows PC when the calculation box is too small to display the results. Fonts are handled differently on iOS/ Mac/ Win. See if changing the length of the box that displays a '?' fixes the issue.
Before i saw this post, and in particular Phil's first reply, i did not suspect this behavior, but it is true, you can try it :
Create a unstored calculation where MyField have this formula :
If ( Get ( RecordNumber) > 1 ; GetNthRecord ( MyField ; Get ( RecordNumber) - 1 ) + 1 )
And then, run a script that do this :Loop
Exit Loop If [ MyTable::MyField = "?" ]End Loop
And then, see how much records your script can create on your computer and your iPhone...
On your computer, it should be 181.
Thanks for the test script, Fred. On the iPhone 5 with iOS7 the limit is 45. Interesting...
Codcruncher's suggestion is nonetheless valid. It was worth pointing out as a too narrow field can also produce that ? so it's a good point to keep in mind if only to rule out that possibility.