Event Colors & Status

How are events color coded?

An item is given the color of the item's calendar, to begin with. It can get a different color if it matches one of your statuses. The item's status colors are based on the contents of a field of your choosing. We call this field the event "status" in the documentation and field mapping, but you can use any field you'd like and translate the interface to call it something else: "department", "category", "state". 

You can also add colors by styling the text in an event: see Event Styles.


Mapping your status field

Setting up color coding begins in field mapping where you're asked which field DayBack should use for "status" (should use for color coding). 

We suggest using "status" for something temporal about the item (like its confirmation status) and use resources for more concrete facts about the event like where it is or whose it is.

When the value of that field matches one of the values in DayBack's list of status filters, you'll see that color in your event. (Watch a step-by-step walkthrough mapping the statutes field in Salesforce.)

You'll maintain the list of statuses and their colors on the filters tab of the DayBack sidebar: think of these like a picklist for that field:

This is the same list you'll see in the event details popover:

Status need not be something temporal. You can map the status field to any field that should determine the color of your event. Here's a short movie of how one might use these settings to switch the calendar from coloring by status to a custom field of your own. In this example, we have a law firm that practices in several cities and we'll color by "practice location": 

Color Salesforce Calendar by Location from SeedCode on Vimeo.


Adjusting status colors

Here are some tips for creating and adjusting status colors.

Click the "+" button below the list of status filters to make a new one.
Select the color you'd like by manipulating the color picker. It consists of three columns. The left, and widest, lets you fine-tune the color. The middle column lets you pick the general color spectrum, and the third column adjusts the transparency.
If you have colors you'd like to match exactly, simply type the RGBA or hex value in right below the color picker. (The "A" in RGBA is alpha, or transparency, so just enter 1 if you're trying to match colors exactly. Hex values are things like #7bd148)
Click on the gear icon beside an existing color to edit or delete it. Note that deleting or renaming a color here doesn't change the value of that field in any items that may be using that status/color. 

Important Note on Status Colors: The color of the event status influences the event text color. If the Green and Blue values (GB in RGBA) are both above 100, the color of your text will be black. If either Green or Blue value is below 100, the color of your text will be white.


Can I color code by calendar instead of by a field?

Yes, if there is no field mapped to "status", items will take their color from the calendar. If you're not using statuses for this source you can mark the source's status field as "unused" below Source Settings where you do the field mapping. 


Can I base the item's color on a Salesforce formula?

Yes, providing your users don't edit the field you've mapped to "status". If they need to edit it, you can use a workflow rule and field update action to update a non-formula field: meaning that a user can still edit the field but it acts like a formula. =)

In order to prevent users from trying to edit this field directly, you'll want to remove the "status" field from DayBack's popover where items are edited. Do this by adding the following string to DayBack's CSS:

.panel-selector[name=status] { display: none; }

If you haven't changed the CSS before, it's easy. Here are the instructions:  changing CSS.

Note that you can hide the status field from just one calendar by prefixing it with the name of that calendar. (Remove any characters that aren't letters from the name.) So, to hide the status field for just a calendar named "Open Jobs" your css would be:

.OpenJobs .panel-selector[name=status] { display: none; }

This can cause an issue when creating a new Event with a status filter selected as DayBack will apply that status to the new Event. DayBack will try to save the Event with that status and Salesforce will throw an error that the formula field cannot be edited. To prevent this behavior you can add a simple Event Action to the source that will prevent any edit to the status field. This will be on On Save action and Prevent Default Action should be turned off.

If ( changesObject.status ) {

delete changesObject.status;

}


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 MS365. However, you'll still need to define status filters (that are the same name) for each color category in MS365 if you want the colors in DayBack to match what you've assigned in MS365. For example, when we assign a color category of "Call" in Outlook for "Follow up with Martha", then the event in DayBack will have a status value of "Call". As long as the status filter created for "Call" has the same color as in M365, the events will show the same color in both DayBack and Outlook


Coloring by user or resource

We feel the columns on DayBack's Resource views are a better way to disambiguate events by users (thereby reserving "status" for something else). 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--the field DayBack colors by--to a custom field (likely a formula field) returning the name of your user. For events, this could be the event's owner, and the formula would be:  Owner:User.FirstName & " " & Owner:User.LastName  (Be sure to leave the status field "enabled" in DayBack's field mapping.)
2
This status field isn't something you want users to modify: it's pointed at a formula field after all. So you'll hide it in the popover following the instructions a couple of sections above under "Can I base the item's color on a formula?". 
3
Where DayBack lists the status filters and their colors in the sidebar you'll enter your users' names: the same names returned by the calculation in step 1.
4
Finally, you'll likely want to change the word "status" to "users" globally: that is best done in DayBack's  translation settings.
When you're done, things will look like this:

Color coding by user