formula text - floating decimal places

  • 0
  • 1
  • Question
  • Updated 3 weeks ago
Currently converting a numeric field to a text field, but i need to be able to display the decimal places properly. Sometimes there are 3 or 4.. Thinking an If statement will take care of it, nut not sure where to start with the conversion.

Currently using the below. 
-----
var number Value = Round([Rate 1],0.01);
var text Decimals = "." & Right(ToText(Int($value * 100)),2);
var text Thousands = If(Abs($Value)>=1000,ToText(Int(Abs($Value)/1000)));
var text Hundreds=Right(ToText(Int($Value)),3);
var text Millions = If($Value>=1000000,ToText(Int($Value/1000000)));


If($value>=1000000,"$" & ToFormattedText($value, "comma_dot") & $decimals,
//If($value>=1000000,"$" & ToFormattedText($value, "comma_dot"),
If($Value=0,"$0.00",
If($Value<0, "- ")
&
"$" & List(",",$Millions,$Thousands,$Hundreds) & $Decimals))
//"$" & List(",",$Millions,$Thousands,$Hundreds)))
------
Photo of Lori Armstrong

Lori Armstrong

  • 70 Points

Posted 3 weeks ago

  • 0
  • 1

Be the first to post a reply!