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.
- From Setup, navigate to:
- Lightning: Objects and Fields | Object Manager.
- Classic: Create | Objects.
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.
- From Setup, navigate to Create | Objects.
- Select TaskRay Task.
- Scroll down to the Field Sets section and click Edit next to Task Card Labels.
- From the palette, 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.
- Click Save.
Assign Colors [Admin]
The final step is to assign colors to each of the picklist values.
- From Setup, navigate to:
- Lightning: Custom Code | Custom Settings.
- Classic: Develop | Custom Settings.
Check It Out!
See it all in action. In TaskRay, all the Task Cards will now display priority labels, color-coded by value.