Site icon FileMakerHacks

Bypassing Scientific Notation

Earlier today I needed 1 billion to render in the calc engine as 1000000000, but FM helpfully converts numbers to scientific notation if they A) are >= 1 billion, and B) contain nothing but zeros following the initial digits.

Example where “A” and “B” are both true:

Example where “A” is true but “B” is not:

At any rate, in the first example, I needed a result of 1000000000, not “1.0E+9”.

Before I get to the work around, I’ll just point out that SetPrecision is of no help here because it only operates on values to the right of a decimal point.

I’ll also point out that I was looking for a work around for any large number, not just 1 billion.

The work around:

And the nice thing about this work around is you can apply it to any number, not just numbers expressed in scientific notation — so you can apply it across the board, and no harm done if it’s not needed, but it will quietly fix any numbers that need fixing.

Bonus (in case you didn’t already know, or had forgotten) — NumToJText is a great way to insert thousands separators, when you want those separators to be part of the data itself.

Exit mobile version