Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6356 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

I decided to start a new thread because I didn't want to hijack someone else's here .

I just can't help myself! I wanted to understand the evaluation order of the calculation referenced ...

[color:blue]a & b + c

Here, you need to know the (undocumented) order of evaluation

... I created a new 9.0 file. However, even using an unstored calculation (result = number), my results wonk out. When I put a value in [color:blue]a (1) and a value in [color:blue]b (1), the calc turns to 11. I then enter 3 in [color:blue]c. Calc produces 14. No surprise. But if I delete [color:blue]b (1), the result is 13. And no refreshing changes it. In fact, if I then change [color:blue]a to 2, it produces 23.

I created a new record. I put 3 in [color:blue]c and 1 in [color:blue]a. It produces 13. Not only am I still in the dark on evaluation order but the dang thing breaks!! It must be seeing field [color:blue]b as 0 so [color:blue]a = 1 & [color:blue]B = 0 = 10 + 3.

I feel madness overtaking me ... :crazy2: (I mean more than usual, ROFLMAO!)

Edited by Guest
Posted (edited)

: Perfect sense.

a = 1

b = blank

c = 3

c + b = 3

a & c = 1 & 3 = 13

nevermind :therethere:

But it sure shot my energy sky high for this afternoon! Better than a gallon of coffee!!

Edited by Guest
Posted (edited)

So, is the fact that mathematical operators are evaluated before text operators the undocumented feature you mentioned? Or is it just the fact that NO reference to evaluation order is made in FileMaker? I find NOTHING on the subject at all!

Edited by Guest
Posted

Well, ONE reference to evaluation order exists, under "Mathematical operators":

FileMaker Pro evaluates formulas from left to right, performing multiplication and division before addition and subtraction.

But other than that it's a matter of testing to discover which operator takes precedence over which.

Posted

Uhm, one additional note:

The "natural" result of a & b + c is Text, because the last operation was a text operation. To write the same thing explicitly:

GetAsText ( a ) & GetAsText ( GetAsNumber (: + GetAsNumber © )

If you set your calculation field result to Number, then that's another conversion of the final text result to a number.

This topic is 6356 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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