Discussions

Expand all | Collapse all

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

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

    Posted 04-30-2018 14:58
    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
    )


  • 2.  RE: I need a duration field background to change color based on duration number

    Posted 04-30-2018 15:12
    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.