Discussions

Expand all | Collapse all

Coloring a field

  • 1.  Coloring a field

    Posted 07-17-2019 19:29


    Hi, a few years ago, I built a bunch of formula fields that would display the text of another field with various colored backgrounds, using a Case() formula in a rich text formula field.

    For the last year or so, I'm with a new company and can't get it to work no matter what. It works for the 2nd condition but not the first. I've tried changing it to If(), changing the colors, with and without the last "", and on and on.

    Looking for suggestions! Thx

    Case([Overall compliance status], "Fully compliant","<div style='background-color:#9EFFAF;'"&[Overall compliance status]&"</div>",

    [Overall compliance status], "Not fully compliant","<div style='background-color:yellow;'"&[Overall compliance status]&"</div>",
    "")



  • 2.  RE: Coloring a field

    Posted 07-17-2019 19:35
    You don't need to repeat the reference to your field in the Case(). Just at the very beginning and then check for expected responses

    Case([Overall compliance status], 

    "Fully compliant","<div style='background-color:#9EFFAF;'"&[Overall compliance status]&"</div>",

    "Not fully compliant","<div style='background-color:yellow;'"&[Overall compliance status]&"</div>",

    "")


    Chayce Duncan | Director of Strategic Solutions
    (720) 739-1406 | chayceduncan@quandarycg.com
    Quandary Knowledge Base


  • 3.  RE: Coloring a field

    Posted 07-17-2019 19:38

    You also need to close your <div>'s see bold and underlined > closures below:


    Case([Overall compliance status],

    "Fully compliant","<div style='background-color:#9EFFAF;'>"&[Overall compliance status]&"</div>",

    "Not fully compliant","<div style='background-color:yellow;'>"&[Overall compliance status]&"</div>",

    "")