Skip to main content
Question

Trying to set the background color on a field with a condition. Keep getting errors.

  • January 22, 2018
  • 0 replies
  • 16 views

Trying to set the background color on a field with the following condition. Its not working. 

If(Contains([Cut Status], "Fabrication Ready"), "<div style=\"background-color:#0CF52B;\">("[Digital Front]"&"-Rev"&"[Revision]")</div>", [Cut Status])

Is this possible to do?
This topic has been closed for replies.

Forum|alt.badge.img
  • Registered
  • January 22, 2018
I'm assuming the "& -Rev &" is part of the text to go inbetween digital front field and revision field.
Using the \ to escape out the quotes works, but it makes it harder to read, so I have replaced that with single quotes. The & needs to be in front and behind the QB field you are using. Hope this works!

If(Contains([Cut Status], "Fabrication Ready"), 
"<div style='background-color:#0CF52B;'>(" & [Digital Front] & "-Rev" & [Revision] & ")</div>",
[Cut Status])

  • Author
  • Registered
  • January 22, 2018
Thanks Ana.

This is effecting the Contains Statement now. Like I think this should work.  


Forum|alt.badge.img
  • Registered
  • January 22, 2018
If(Contains([Cut Status], "Fabrication Ready", 
"<div style='background-color:#0CF52B;'>(" & [Digital Front] & "-Rev" & [Revision] & ")</div>", 
[Cut Status]))

See if that works

  • Author
  • Registered
  • January 22, 2018
Thanks, I will try something different. 

  • Author
  • Registered
  • January 22, 2018
Ok this Works.  I changed the List box just to a Text field and did this Formal and it Worked.


So this issue has to be with the Contains Function.