Skip to main content
Question

Help with formula (colors)

  • October 14, 2021
  • 0 replies
  • 33 views

Forum|alt.badge.img+11
Getting this message:






[BOARD RATE]


var text ButtonColor = Case([CP - DW.2 BOARD RATE LABOR ONLY $]>0,
"#e600e6");

var text WordsColor = Case([CP - DW.2 BOARD RATE LABOR ONLY $]>0,"BLACK");


// Begin button style
var text bgcolor = $ButtonColor;
var text txtcolor = $WordsColor;
var text style = "style=\"text-decoration: none; text-align: center; background:" & $bgcolor & "; \nwidth: 20px; \nheight: 14px\nborder-radius: 5px; padding: 5px 5px; color: " & $txtcolor & "; display: inline-block; font: normal 700 24px/1 \"Calibri\", sans-serif; text-shadow: none;";
// End button style


"<div "& $style &">" & [CP - DW.2 BOARD RATE LABOR ONLY $] & "</div>"

//"<div " & $style & " " & [CP - DW.2 BOARD RATE LABOR ONLY $] & "</div>"

------------------------------
BuildPro
------------------------------

MarkShnierYou
Forum|alt.badge.img+24
try this.    Use IF in that situation as opposed to CASE.

var text ButtonColor = IF([CP - DW.2 BOARD RATE LABOR ONLY $]>0,
"#e600e6");

var text WordsColor = IF([CP - DW.2 BOARD RATE LABOR ONLY $]>0,"BLACK");

------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------

Forum|alt.badge.img+11
  • Author
  • Registered
  • October 14, 2021
I don't think this is really what I am trying to do....please disregard.

This is what I want the [BOARD COUNT] field to look like:
If [CP - DW.2 BOARD RATE LABOR ONLY $]>0
....[BOARD COUNT] turn "green" and display the value (in white) from the [CP - DW.2 BOARD RATE LABOR ONLY $] field

------------------------------
BuildPro
------------------------------