Skip to main content
Question

Coloring a field

  • Jul 17, 2019 11:29 PM UTC
  • 2 replies
  • 43 views


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>",
"")

This topic has been closed for replies.

2 replies

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

AdamKeever1
Forum|alt.badge.img+2
  • Qrew Commander
  • Jul 17, 2019 11:38 PM UTC

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>",

"")