Forum Discussion
QuickBaseCoachD
7 years agoQrew Captain
Try this one. Just change the first line to use your currency field.
var number Value = Round([My Currency field],0.01);
var text Decimals = "." & Right(ToText(Int(Abs($value) * 100)),2);
var text Thousands = If(Abs($Value)>=1000,ToText(Int(Abs($Value)/1000)));
var text Hundreds=Right(ToText(Int(Abs($Value))),3);
If($Value=0,"$0.00",
If($Value<0, "<font color=red>- ")
&
"$" & List(",",$Thousands,$Hundreds) & $Decimals)
var number Value = Round([My Currency field],0.01);
var text Decimals = "." & Right(ToText(Int(Abs($value) * 100)),2);
var text Thousands = If(Abs($Value)>=1000,ToText(Int(Abs($Value)/1000)));
var text Hundreds=Right(ToText(Int(Abs($Value))),3);
If($Value=0,"$0.00",
If($Value<0, "<font color=red>- ")
&
"$" & List(",",$Thousands,$Hundreds) & $Decimals)
AlexCertificati
7 years agoQrew Cadet
So, it's necessary to recapitulate the baked-in currency settings for a numeric field in code in a formula field that wants to use the settings selected for that field, do I have that right?
Do you think this represents a bug in the ToText function, or at least an error in its documentation, which reads 'Returns a Text value containing the print representation of the argument', which appears based on this conversation not to be true?
Do you think this represents a bug in the ToText function, or at least an error in its documentation, which reads 'Returns a Text value containing the print representation of the argument', which appears based on this conversation not to be true?