Discussions

Expand all | Collapse all

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

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

    Posted 01-22-2018 16:45
    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?


  • 2.  RE: Trying to set the background color on a field with a condition. Keep getting errors.

    Posted 01-22-2018 17:09
    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])


  • 3.  RE: Trying to set the background color on a field with a condition. Keep getting errors.

    Posted 01-22-2018 17:40
    Thanks Ana.

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



  • 4.  RE: Trying to set the background color on a field with a condition. Keep getting errors.

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

    See if that works


  • 5.  RE: Trying to set the background color on a field with a condition. Keep getting errors.

    Posted 01-22-2018 18:20
    Thanks, I will try something different. 


  • 6.  RE: Trying to set the background color on a field with a condition. Keep getting errors.

    Posted 01-22-2018 18:39
    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.