Forum Discussion

MikeBlinkhorn1's avatar
MikeBlinkhorn1
Qrew Trainee
7 years ago

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

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
)

1 Reply

  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    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.