Forum Discussion

CourtneahThomas's avatar
CourtneahThomas
Qrew Member
3 years ago

Rich text duration field

Hello,

I am attempting to create a rich text field that will change the color of the field if the field is a negative or positive number.  The field I am attempting to do this on is called [YTD Change-Incoming to Answer].  That field is a duration field that displays the number of seconds between last years incoming to answer and this years incoming to answer.  If the number is a positive number, I want the field background to be red, as it is a negative change.  This is the formula I have but it won't let me use < or > since the field is a duration field.  Any ideas?

If([YTD Change-Incoming to Answer] > "0" , "<div style=\"background-color:red;\"> Urgent</div>", [YTD Change-Incoming to Answer] )

------------------------------
Courtneah Thomas
------------------------------

4 Replies

  • Try this 


    If([YTD Change-Incoming to Answer] > Days(0) , "<div style=\"background-color:red;\"> Urgent</div>", [YTD Change-Incoming to Answer] )


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • CourtneahThomas's avatar
      CourtneahThomas
      Qrew Member
      Hi Mark!!!

      It's giving me the error "expecting text but found duration" on the last [YTD Change-Incoming to Answer] in the formula. 

      ------------------------------
      Courtneah Thomas
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Try this

        If([YTD Change-Incoming to Answer] > Days(0) , "<div style=\"background-color:red;\"> Urgent</div>", ToText([YTD Change-Incoming to Answer] ))

        im not really sure which unit of measure it will show, but see what that does.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------