Forum Discussion
I think it just works how it works.
If you'd like, you can try this formula. I'm giving credit to Laura Thacker on this one.
Hi everyone,
I stumbled across a post from Mark 5 years ago with a reply by Ursula Llaveria. I put this into my “Numbers as Text” application (which is EOTI) to test it because it was a super-simple (length wise) solution to displaying currency values in text format. Below is the formula.
//Courtesy of Ursula Llaveria
//-- Grab original value / Grab the decimal value
var number OriginalValue = [Number];
var number theSplit = Frac([Number]);
//--make sure the decimal value has at least two number, if it doesn't, add a 0. This will make sure that someone that just added a .5 displays as .50
var number cents = ToNumber(Left(Right(ToText($theSplit)&"0","."),2));
var text numt = ToText(Floor($OriginalValue));
//-- check to make sure that if the user did not add decimals, it still displays .00, adds a 0 before any single digits, and is formatted like so: ($xxx.xx)
"$" & ToFormattedText(ToNumber($numt),"comma_dot",3) & "." & If($cents>0 and $cents<10,"0"&ToText($cents),If($cents>=10,ToText($cents),"00"));
//The above function makes sure that no decimal is rounded up, but stays exactly as it was input in the field.
Regards,
Laura Thacker