Forum Discussion

KatherineOakey's avatar
KatherineOakey
Qrew Member
5 years ago

Change color of field in report based on value

I have a Formula-Duration field that shows the number of days since the record was created.

roughly the formula is   Today - ToDate([Date Created])

I would like to color code the value in the report so that 'old' durations are in, say Red, while middle age records are Yellow txt and new/current records (say < 30 days old) are either Green or Black.

I was also considering using the report color coding but Formula - Duration isn't an eligible field type.

------------------------------
Katherine Oakey
------------------------------

4 Replies

  • Try this

    var number DaysOld = ToDays(Today() - ToDate([Date Created]));

    IF(
    $DaysOld < 30, "#00FF00" // green
    $DaysOld < 45, "yellow",
    $Days Old >=45, "Pink")

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      I should have made it clear that this is a formula to be used as a row colorization formula. Not for a field formula.

      ------------------------------
      Mark Shnier (YQC)
      Quick Base Solution Provider
      Your Quick Base Coach
      http://QuickBaseCoach.com
      mark.shnier@gmail.com
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        I see that I was missing a comma  




        var number DaysOld = ToDays(Today() - ToDate([Date Created]));


        IF(
        $DaysOld < 30, "#00FF00", // green
        $DaysOld < 45, "yellow",
        $Days Old >=45, "Pink")



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