Customize Task Card Label Colors According to Picklist Selection

Note: This feature is available to the following product editions
  • Starter
  • Standard
  • Premium

Task Card Labels can help you stay organized and prioritize your tasks in Kanban and Row Views by displaying values from selected fields on the Task Cards. By default, the labels do not change colors based on the value (the color is associated with the field, not the value). However, it is possible to customize the labels to display in different colors based on the picklist selection for the designated field.

In the instructions below, we will use the Priority field as an example. Priority is a picklist field with the following choices: High, Normal, Low. Let's customize it, so that the color of the Priority labels on the Task Cards will change as follows: red for High, yellow for Normal, and green for Low.

You can use these instructions and adjust them for any other picklist field on TaskRay Tasks.

  

Add Priority to Task Card Labels [Admin]

If you have not already done so, add the Priority field to the Task Card Labels, so that the Priority label is displayed on Task Cards.

 

Create Formula Fields for Each Picklist Value [Admin]

We need to create a custom formula field for each of the possible values (High, Normal, Low). In this case, we will need to create 3 formulas because there are 3 values.

  1. From Setup, navigate to:
  • Lightning: Objects and Fields | Object Manager.
  • Classic: Create | Objects.
  • Click on TaskRay Task
  • Under Fields & Relationships, click on New.
  • Select Formula and click Next.
  • Enter Field Label and Field Name (e.g. "Priority High").
  • For Formula Return Type, select Text. Click Next.
  • Enter formula: IF(ISPICKVAL( TASKRAY__Priority__c , "High"),"High", null)
  • Click Next.
  • Using the checkboxes, set field level security for the profiles. Click Next.
  • Uncheck the box next to Project Task Layout. 
  • Click Save & New.
  • Repeat steps 4-11 two more times: for Normal and Low Priority values. For step 7, adjust the formula as follows:

    • Normal: IF(ISPICKVAL( TASKRAY__Priority__c , "Normal"),"Normal", null)
    • Low: IF(ISPICKVAL( TASKRAY__Priority__c , "Low"),"Low", null)

     

     

    Add the New Formula Fields to the TaskRay Task Card Field Set [Admin]

    Once all the custom formula fields have been created, the next step is add them to the TaskRay Task Card field set.

    1. From Setup, navigate to:
      • Lightning: Objects and Fields | Object Manager.
      • Classic: Create | Objects.
    2. Select TaskRay Task.
    3. Navigate to the Field Sets section and select Task Card Labels.
    4. From the container across the top, drag the new formula fields (Priority High, Priority Normal, Priority Low) and drop them into the In the Field Set container.

      Important! Be aware of the positions of the formula fields in the list. For example, it might be best to put the Priority High at the top, followed by Priority Normal, and then Priority Low. These will correspond to Task Label Color # in the next section.
    5. Click Save.

     

    Assign Colors [Admin]

    The final step is to assign colors to each of the picklist values.

    1. From Setup, navigate to:
    • Lightning: Custom Code | Custom Settings.
    • Classic: Develop | Custom Settings.
  • Click Manage next to TaskRay Global Settings
  • If setting for the first time, click New just above the line that reads Default Organization Level Value otherwise click Edit.

    Careful! There are two New buttons. One sets default limits at the organization level, the other sets limits by user or profile. We do not currently support user or profile based settings.
    this_is_the_new_button_you_want__1_.png
  • Scroll to the Task Label Color fields. The numbers will correspond to the position of the Priority field values in the Task Card Labels Field Set list. Assign colors to Task Label Color 1, 2, and 3 using 6-character hex values. 

    Note: The 6-character hex value must be preceded by the # symbol. For example, you could use #ff0000 for red (High Priority), #ffe600 for yellow (Normal Priority), and #17ad26 for green (Low Priority).
  • Click Save.
  •  

    Check It Out!

    See it all in action. In TaskRay, all the Task Cards will now display priority labels, color-coded by value.

    Was this article helpful?

    6 out of 7 found this helpful

    Have more questions? Submit a request