Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Calculation Length

Featured Replies

What is the maximum length of a calculation? Not the result but the actual thing when you write the calculation - is there a limit?

From FileMaker Tech Info

http://www.filemaker.com/support/techinfo.html

Article #6074

Technical Specifications of FileMaker Pro 8.5 and FileMaker Pro 8.5 Advanced

Size of calculation formula: Maximum of 30,000 characters, including text and numbers, any referenced fields, operators, functions and parentheses.

This question intrigued me due to the fact that FM8 can handle so much more than older versions......I couldn't find an answer though.

Honestly would think you are unlimited overall though, considering you could use seperate fields if you were limited and break the calc up.

But I woulkd like to know the answer too if there is one.

Edit: lol....Nice Fenton...I looked and didnt see that one.

Edited by Guest

  • Author

Thanks., good to know it is not too short.

I believe there is also a limit to the number of nested "operations" within a calculation. It used to be about 300. You get a message when you reach it. It's only happened to me once, a long time ago, in FileMaker 5. I don't think know if the calculation limitations have increased since then; the 30,000 is the same as it was I think.

Of course, as you say, you can use more than 1 field. Or nowdays a recursive Custom Function; if you can write the darn thing :-].

Hi Fenton,

There seems to be a limit in the number of 'nested' Evaluation ( ), but I can't find this information anywhere.

Anyone knows the answer ?

What I call next should rather be called combination

Evaluation ( my formula ) & "¶" &

Evaluation ( my formula ) etc...

The 30,000 char limit is for the calculation dialog, the calc-engine is limited only by stack space used to parse and execute, so it depends on what you're doing.

Here's an example file, it shows with 8.5 I'm able to sucessfully nest about 1000 If().

Adding numbers like: 1+1+1+1+1+....+1 lets me do about 3200 additions.

Finally, a simple calculation of Evaluate( Quote( ) ) shows the calc engine operating on text in excess of 150K.

BigCalcs.fp7.zip

Edited by Guest
clarification

As expected the Shadow knows :

Thanks Shawn for the piece of information. For some reason, in my own testing files, I don't get the same result from PPC to Intel

Is that something new also ?

Edited by Guest

Since FMP7, the limitation is the machine's stack, and the stack layout can differ on different platform. To be clearer, the processor stack is used up by recursive C++ calls, and the number of paramters and locals they have, and their types (and therefore sizes).

One set of (C++ call, parameters, locals) is usually referred to as a stack frame, and I wouldn't expect them to be the same size on different platforms - often the calling conventions the processor affect this size.

Evaluation ( my formula ) & "¶" &

Evaluation ( my formula ) etc...

Another thing I should probably mention, while I was only able to add 3200 times using:

  1+1+...+1

It can be made to go much higher using:

  (1+1+...<3200 times>...+1) + (1+1+...<3200 times>...+1)

This is due to the fact that the parse tree is not so deep, as the calc engine sees

  1+1+1+1

as if it were written:

  ((1+1)+1)+1

since addition is a left-associative operator.

A similar change should also allow more Evaluate()'s to be used in a single calculation.

Dont know when I would ever pratically use this many characters in one calc but its great to know anyway. Thanks for the info as usual! :P

Excellent, thanks Shawn.

For information, I was lately working on a non recursive function involving Substitute and Evaluation to grab the entire foundset.

It effectively breaks as you state after 32,000 evaluation, but it stil works faster than any of the function I have crossed ( though not as fast as the copy all records )

Well, I just love these explanations on how the engine really work

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.