Forum Discussion

DianaCiccolini's avatar
DianaCiccolini
Qrew Trainee
7 years ago

How do you highlight a field based on text value?

I have a table with requests for an Audit. I have a column with QB Status as the title and the field either says Open, In Progress, or Closed. 

I want Open to be highlighted in a light green, In Progress to be highlighted in a light yellow, and Closed to be highlighted in a light red. I have tried some formulas but I am very new to QB so I have not had much experience with syntax errors. 

Here is an example of a formula I tried:

If([QB Status]="Open", "<div style=\"background-color:green;\"> Open</div>", [QB Status] )

Can someone please help me with a formula? Thanks!

6 Replies

  • ChrisChris's avatar
    ChrisChris
    Qrew Assistant Captain

    See if you like this a little better:

    If([qb status]="Open", "<div style=\"width:70px;padding:3px;background-color:green;color:white\"> Open</div>", [qb status] )


    • DianaCiccolini's avatar
      DianaCiccolini
      Qrew Trainee
      I'm still not seeing any change, but I didn't get any syntax errors. 

      I am currently in my Report Settings and I clicked Highlight Records based on criteria and inputted that formula.

      Should I be doing this on a different page? 
    • ChrisChris's avatar
      ChrisChris
      Qrew Assistant Captain
      OOHH, I made a formula field. I had assumed you were on a form.
    • ChrisChris's avatar
      ChrisChris
      Qrew Assistant Captain

      In the report settings, use this syntax for highlighting a row:

      if ([Priority] = "High", "pink", "")
      You can use hex code for color if you want to, "#cc66cc", etc.