I need a duration field background to change color based on duration number

  • 0
  • 1
  • Question
  • Updated 7 months ago
  • In Progress
I have a duration field that calculates the number of days old, based on if another field (status) is not set to "closed". I would like that fields background to change to red if the duration is more than 2 days and the status field is not set to closed.

The duration formula I'm using is:

If(
  // Open Tickets
  [Status]<>"Closed",Today()-ToDate([Date Created]),

  // Closed Tickets
  [Status] = "Closed", [Date Modified] - [Date Created],

  // Default (Should not should occur)
  null
)
Photo of Mike Blink

Mike Blink

  • 100 Points 100 badge 2x thumb

Posted 7 months ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
You will need to use a formula-rich text field to add the styling you would like.

The dates will need to be converted ToText() and then you can use a span or a div to highlight as desired.