Forum Discussion

RJR3's avatar
RJR3
Qrew Member
5 days ago

Project Status Spotlights

Hi,

I am using a Project Status multiple choice dropdown field with the following options:

Green - On Track

Yellow - At Risk

Red - Off Track

Blue - Complete

Purple - On Hold

Black - Canceled

Silver - Closed

I'd like to incorporate the Project Spotlight formula featured in Exchange so that the status displays in it corresponding color (while also keeping the text separate). 

I'm struggling with where to insert the formula and how to modify the formula to recognize my custom status values and colors noted above. 

I appreciate the help!

3 Replies

  • I have something you might be able to leverage.  This is a Formula Rich Text field.  It looks at the date of the record and displays the day of week abbreviation with a different color background for each day of the week.

    You could do the same for your different statuses.  The color variable defines the background color based on the day of week.  The dayText variable defines the text to display.  The result variable creates a box with the corresponding color/text.

    var text color = Case(
     DayOfWeek([Date]),0,"#845EC2"
    ,1,"#D65DB1"
    ,2,"#FF6F91"
    ,3,"#FF9671"
    ,4,"#FFC75F"
    ,5,"#F9F871"
    ,6,"#008F7A"
     );
     
     var text dayText = Case(
     DayOfWeek([Date]),0,"Sun"
    ,1,"Mon"
    ,2,"Tue"
    ,3,"Wed"
    ,4,"Thu"
    ,5,"Fri"
    ,6,"Sat"
     );
     
     var text result = "<a style=\" text-decoration: none; background:" & $color & "; border-radius: 2px; color: #fff; display: inline-block; width: 30px; text-align: center; padding: 1px 1px; font: bold 700 10px/1 \"Calibri\", sans-serif; text-shadow: none; title=\"S\">" & $dayText &"</a>";
    
    $result

     

  • I should have also mentioned that you would create the Formula Rich Text field and then place it next to your status field on the relevant forms.

  • Roy-Wanyoike's avatar
    Roy-Wanyoike
    Qrew Assistant Captain

    This should be easy create a formula rich text field and then use case to assign the colors. 
    Case([Project Status], 
    "Yellow - At Risk", "<span background-color:#ffc107>",

    .......
    )