Event Colors & Status
How are Events Color-Coded?
Events are initially color-coded based on the color of their calendar. They can also receive a different color if they match one of your configured event statuses. The status colors are determined by the contents of a field of your choosing. We refer to this field as the event "status" throughout our documentation and within the field mapping section of your calendar configuration. However, you can use any field name you prefer and then rename DayBack's standard terms to call it something else, such as "Department," "Category," or "State."
Additionally, you can add colors by styling the text within an event. For more information, see Event Styles.
In this article
Mapping Your Status Field
Setting up color coding starts with field mapping, where you'll be asked which field DayBack should use for "Status" (used for color coding).
We recommend using the "Status" field to represent something temporal about the item, such as its confirmation status. We also recommend mapping the resources field for more concrete details about the event, like the event's owner, a location or piece of equipment.
When the value of the status field matches one of the values in DayBack's list of status filters, the corresponding color will be applied to your event. You can watch a step-by-step walkthrough on mapping the status field in Salesforce. Think of these statuses as a picklist for that field.
You can manage the list of statuses and their corresponding colors on the filters tab of the DayBack sidebar.
Using a Different Field to Color Your Events
You can map the status field to any field that should determine the color of your event. Here's a short movie demonstrating how to switch the calendar from coloring by status to a custom field of your own. In this example, a law firm practices in several cities and colors events by "Practice Location.", such as a City, or State.
The video explains how to:
- Map and name the custom field correctly.
- Rename the sidebar status fields to use the term "Practice Locations" in the relevant sections of DayBack's configuration.
Adjusting Status Colors
Here are some tips for creating and adjusting status colors in DayBack:
- Creating a new Status Color:
- Click the "New Status +" button below the list of status filters to create a new one.
- Use the color picker to select your desired color. The color picker consists of three columns:
- The left column (widest) lets you fine-tune the color.
- The middle column allows you to pick the general color spectrum.
- The right column adjusts the transparency.
- Matching Specific Colors:
- If you need to match specific colors, type the
rgba
orhex
value below the color picker. - For
rgba
, the "a
" stands for alpha (transparency). Enter 1 for no transparency if you're matching exact colors. Hex
values are six-character codes like#7bd148
.
- Editing or Deleting an Existing Color:
- Click on the gear icon beside an existing color to edit or delete it.
- Note: Deleting or renaming a color doesn't change the value of the field itself
Color-Coding by Calendar Instead of a Field
If there is no field mapped to "status", items will take their color from the calendar. If you're not using statuses for a specific calendar source you can mark the source's status field as "unused" below Source Settings where you configure your field mapping.
Using Salesforce Formula Fields for Event Colors
You can base your event's color on a Salesforce Formula Field that you've mapped to your "status" field, provided that your users do not attempt to edit this field. Since formula fields are read-only, users will receive a Salesforce error if they try to change the value of this field in DayBack.
To address this, you have a few options:
- Make the Field Read-Only: Configure the field in DayBack to be read-only.
- Hide the Field: Hide the formula field in DayBack to prevent users from attempting to edit it.
- Allow Edits with Event Action: If you need to allow edits to the field, use an "On Event Save" Event Action. This action will prevent attempts to save changes to the "status" formula field and instead send the change to the actual editable field that stores the value that is retrieved by your formula field calculation. This ensures that the formula field remains unchanged while the underlying data is updated appropriately.
Hiding Read Only Formula Fields
You can toggle the visibility and read-only settings of your formula fields by toggling the relevant setting in your object's field mapping:
Allowing Edits While Saving Changes in an Alternative Field
Prevent Edits to the "Status" Formula Field
When you create a new event with a status filter selected, DayBack will attempt to apply that edit to the "status" field. Since Salesforce will throw an error if a formula field is edited, you need to add a simple Event Action to the specific calendar source to prevent any edits to the status field. This must be configured as an "On Event Save" action with "Prevent Default Action" turned off. The action detects if the attempted change includes the status field, and if found, it deletes the change attempt:
if ( changesObject.status ) { delete changesObject.status; }
Storing the Value in the True Editable Field
If you want to allow users to change the value and need the value written to the true editable field, you will need to modify this example further by adding the true field name to the changesObject
. Refer to our code example for detailed instructions on writing values to alternate fields when using formula fields.
Can I base the item's color on a FileMaker calculation?
You can't simply use a calculated field for status since the status/color field needs to be editable. You can, however, use an auto-enter calc for statues to get the same effect.
Microsoft 365
The status value in DayBack correlates with the color category in Microsoft 365 (MS365). However, to ensure the colors in DayBack match those assigned in MS365, you need to define status filters in DayBack that have the same names as the color categories in MS365. You'll then need to apply those same colors to DayBack's filters.
For example, if you assign a color category of "Call" to an event titled "Follow up with Martha" in Outlook, the event in DayBack will have a status value of "Call". To display the same color for this event in both DayBack and Outlook, create a status filter in DayBack named "Call" and assign it the same color as in MS365. This way, the events will appear with consistent colors in both platforms.
Coloring by User or Resource
We believe using columns in DayBack's Resource views is the best way to differentiate events by users, reserving the "status" field for other purposes. We recommend that you add a second color, so that you're color-coding by status AND resource. But you can color code by user. Here's how:
- 1
-
Map the status field:
This is the field DayBack uses for color-coding, to a custom field (likely a formula field) that returns the name of your user. For events, this could be the event's owner, and the formula might be:Owner:User.FirstName & " " & Owner:User.LastName
. Ensure the status field remains "enabled" in DayBack's field mapping. - 2
-
Hide the Status Field:
Since the status field is a formula field and should not be modified by users, hide it in the popover. Follow the instructions in the section "Can I base the item's color on a formula?".
- 3
-
Enter User Names in Status Filters:
In the sidebar where DayBack lists the status filters and their colors, enter your users' names. These names should match those returned by the calculation in step 1. - 4
-
Rename "Status" to "Users":
To make it clear that the colors represent users, change the word "status" to "users" in DayBack's translation settings.
When you're done, your Calendar will look like this: