Skip to main content
Question

Color Coding Fields: Duration

  • August 3, 2023
  • 0 replies
  • 230 views

Forum|alt.badge.img+5

I want to color code a field within a report, but the field is a Duration Type. Currently I am color coding within the report instead of just the field, but it's too much color and doesn't convey what I am needing. I am trying to give a heat map type look for a duration field. Does anyone know how to apply this color coding scheme within this field:

Field Formula: Days In Discovery

Today() - ToDate([Discovery Timestamp])

Color Coding Formula:

var number DaysInDiscovery = ToDays([Days in Discovery]);
 
If(
$DaysInDiscovery >=45 and $DaysInDiscovery <= 60, "#74A235",
$DaysInDiscovery>=61 and $DaysInDiscovery <= 90, "#90B433",
$DaysInDiscovery>=91 and $DaysInDiscovery <= 120, "FFED44",
$DaysInDiscovery>=121 and $DaysInDiscovery <= 180, "F9A900",
$DaysInDiscovery >=181, "FF1100")


------------------------------
Elizabeth Schlagel
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24

You will need to create. New formula Rich Text field for your report.  Here re some cheat notes I have.

Background Shading Yes  
https://help.quickbase.com/user-assistance/color_field.html

Background Shading
var text ColorCode =

If(

[Delivery Date]-Today()<Days(1),"pink",

[Delivery Date]-Today()<Days(3),"yellow",

[Delivery Date]-Today()<Days(5),"green");

var text DateText = ToText([Delivery Date]);

Case($ColorCode,

"pink","<div style=\"background-color: pink;\"" & ">" &  $DateText & "</div>",

"yellow","<div style=\"background-color: yellow;\"" & ">" &  $DateText & "</div>",

"green","<div style=\"background-color: #00C957;\"" & ">" &  $DateText & "</div>", $DateText)


------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------