Skip to main content
Question

toFormattedText rounding and changing hard coded number in formula field

  • January 22, 2020
  • 0 replies
  • 211 views

Hi All, 

I am attempting to format a numeric field in a formula-text. Using the example for toFormattedText: ToFormattedText(1234567.89,"comma_dot"), my response should be "1,234,567.89". So why is it that when I display that field on the form, it is displaying: 1,234,567.9 !?!?!?!?!  

I tried to use this formula to convert a currency field, and it is rounding it to the first decimal point. Any ideas what is going on?



------------------------------
Ursula
------------------------------
This topic has been closed for replies.

  • Registered
  • January 22, 2020
I see the exact same thing. If I save the formula as the example shows and go back into it the number is also different. "1234567.89" becomes "1234567.9" in my formula even.

I was able to get it to finally display 2 decimals by using a Formula Numeric field(set to 2 decimal places in the properties) and this formula ToNumber(ToFormattedText(1234567.9,"comma_dot")) but it rounds 89 up to 90. Funnily enough if you do the same function but with dot_comma instead QuickBase interprets the first dot as the first decimal place instead of the first separator and only displays 1.23 instead of the full number. So this whole function may be a little screwy depending on your app settings as well, I assume that is what is causing that in mine.