Skip to main content
Question

Formula Field Coloring Help

  • June 1, 2017
  • 0 replies
  • 125 views

Hey, guys, I have an issue trying to color the font and change the font size in a formula text field (which I made to be able to use HTML for a formula numeric field).

The issue is that the number is formatted as currency, so I am trying to pull that through into the formula text field, and I managed that, but now I can't figure out where to place the color tags.

Here is the formula. 
var number Value = Round([Calculated SL Tax],0.01);

var text Decimals = "." & Right(ToText(Int($Value * 100)),2);

var text Thousands = If($Value>=1000,ToText(Int($Value/1000)));

var text Hundreds=Right(ToText(Int($Value)),3);

If($Value=0,"$0.00",

If($Value<0, "- ")

&

"$" & List(",",$Thousands,$Hundreds) & $Decimals)

This works in returning the calculated number with the proper currency formatting, but now how do I go about changing the color and size of the font?
This topic has been closed for replies.

  • Registered
  • June 1, 2017
Try this:

"<div style=\"font-size: 9pt; color:black;background-color:orange; width:80px; text-align:center; \">"&"YOUR TEXT VALUE HERE"&"</div>",