Skip to main content
Question

Formula - Rich Text code displaying on dynamic filter

  • July 25, 2019
  • 0 replies
  • 39 views

Hello! I'm a beginner to QB. I've searched high and low in the community posts for a similar question and haven't come across any.

I wrote a rich text formula to evaluate if a date is before or after today's date and mark the status "Active" and green or "Inactive" and gray. It works beautifully except the code to change the colors is being displayed in the dynamic filter. Ideally it would only display "Active" or "Inactive". If anyone can review my formula and help me fix it, it would be appreciated!

If([Term End] > Today(),"<div style=\"color:green;\">Active</div>", "<div style=\"color:gray;\">Inactive</div>")





This topic has been closed for replies.

Right, so DFs will not render in HTML.  I suggest you make two fields.

The Status field would be formula text.

If([Term End] > Today(),"Active", "Inactive")

The [Status colored] field or perhaps named [Status.] if you want to be sneaky and have a short name for reports would be a Rich text formula field 

Case([Status],
"Active",   "<div style=\"color:green;\">Active</div>",
"Inactive", "<div style=\"color:gray;\">Inactive</div>")

The use the [Status] field as the DF and the [Status.] field on the report.