5 Replies Latest reply on Jun 21, 2012 10:59 AM by Dekade

Calc returns VERY strange numbers

Title

Calc returns VERY strange numbers

Post

FMProADV 10.0v3 on Windows 7 Professional 64 bit

I have messed around for hours on the following calculation problem. Either something is wrong with my software/hardware or I am simply not seeing what I am doing wrong.

Here is the calculation:

Field: 'Trial First 40 Overtime'.  Case ( Trial First 40 Worked > "40"; Trial First 40 Worked - "40"; "" )

Here is the problem:

Everything works fine except for 'Trial First 40 Worked' digits 5 thru 9.  5 returns "-35", 6 returns "-34", 7 returns "-33", 8 returns "-32", and 9 returns "-31".

'Trial First 40 Worked' digits 1 thru 4 and 'Trial First 40 Worked' digits 10 thru 40 return appropriate results.

What the heck is going wrong that I don't see?

• 1. Re: Calc returns VERY strange numbers

The text 5 is greater than the text 40 ( and so on ).

Try:

Case(
GetAsNumber (  Trial First 40 Worked ) > 40 ; Trial First 40 Worked - 40

• 2. Re: Calc returns VERY strange numbers

Raybaudi,

That did the trick! Thanks so much. I can kinda see how 5 is bigger than 40; but, then on the other hand I don't really see it. Is that comment deserving of a reply? If not, then I'm glad at least that your solution worked.

• 3. Re: Calc returns VERY strange numbers
`If you have 3 records with a single field of type "text" containing:54051and make them sort in ascending from FileMaker, you'll get:40551This is because the field is of type "text" and NOT "number"`
• 4. Re: Calc returns VERY strange numbers

Think of the "rules" you use to sort words into alphabetical order:

"ape" will sort before "xylophone"

because the first letter "a" evaluates as less than "x".

apply the same rules to numbers and you get the "numbers as text" order that Raybaudi has posted here.

• 5. Re: Calc returns VERY strange numbers

Thanks to both of you,

I get the process now.

Have a nice day,