Skip to main content
Question

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

  • April 30, 2018
  • 0 replies
  • 46 views

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
)
This topic has been closed for replies.

  • Registered
  • April 30, 2018
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.