Skip to main content
Question

Maintain Numeric Settings w/ HTML

  • September 27, 2018
  • 0 replies
  • 135 views

Hello, I'm trying to show a Numeric Formula field in red by way of a Rich Text Formula field.

This is what I'm using in the Rich Text Formula field:"<div style=\"color:#ff0000;font-size:9pt\">$"&[Sub-Total w/ Vacancy]&"</div>"

The [Sub-Total] field is a Formula - Numeric field, with the currency option chosen. 

The rich text field removes the dollar sign and decimal point from the numeric field. On one value it also added more decimal points than the numeric field allows for.

Any ideas how to maintain the numeric settings in the rich text field?
This topic has been closed for replies.

That's pretty interesting. What happens when you try wrapping the currency field with a ToText() ?

I have a formula I will post when i get a chance....

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)