Step 6: Resources – Using Columns To Dynamically Color Code

Utilizing Resources on a Calendar Display is similar to the idea of applying dynamic grouping. You identify a column to use as the resource and the calendar color-codes the calendar items based upon the value in that column.

 

To achieve this result, the builder sets a number of properties on the Display Wizard’s Resources page.

General Setup Section

Resource column

The column to reference as the resources. This is empty by default, but is often set to the Item Source List, Item Source Site, or Assigned To.

If you keep the default, all of the items are shown in the same color and the end user cannot dynamically filter using the checkboxes in the Resources area.

Resources heading

The resources are shown on the user interface to the left of the calendar, with a default heading of the name of the column selected above. If you want to use a different heading, type the desired heading here.

Hide resources section

Select this checkbox if you do not want to show the resources listing on the left side of this view. The items can still be color-coded by resource, whether or not this checkbox is selected.

Hide resources section if only one resource

When this checkbox is selected and there is only one resource value, the resource will not be named in the Resources area on the left side of the calendar.

Sort resources

The resource list shown to the left of the calendar is sorted in ascending order by default. The builder can change this to sort in descending order, or remove the mark from this checkbox and have the resources listed in the order in which they are found.

Color Options

By default, the Color Options is set to Single Color.  When the Single Color option is selected, the single color selected here is applied to all of the items on the calendar, regardless of the resource value. The resources are still listed to the left of the calendar, so the end user can use the checkboxes in that area to dynamically filter the results.

When the Theme option is selected, a drop-down is offered with different precreated themes.  Choose a theme and each item on the calendar will be shown with a color background that corresponds to its resource value. A variety of themes are available.

If the Custom XML option is selected, a custom defined XML can be added into the component. The builder can use this property to identify either the desired XML. Colors can be identified either by name or by hexadecimal value. Sample XML might look like this:

<resourceColors>
        <value>Example Value</value>
        <color>#fff</color>
</resourceColors>

Possible Resource Options

Table 7: Functions For Date Filtering

What you want the user to be able to do

How to make it possible

See all items in different colors according to resource, filter on resources using checkboxes in the Resources area to the left of the calendar

1. Select an option other than None from the Resources column drop-down.

2. Keep the Hide resources section checkbox blank.

3. Select a theme from the Resources Color Options area.

See all items in different colors according to resource, but hide the legend and do not allow the user to filter on resources

1. Select an option other than None from the Resources column drop-down.

2. Place a mark in the Hide resources section checkbox.

3. Select a theme from the Resources Color Options area.

See all items in the same color regardless of resource, but still filter on resources using the Resources area checkboxes

1. Select an option other than None from the Resources column drop-down.

2. Keep the Hide resources section checkbox blank.

3. Select One color from the Resources Color Options area.

See all items in the same color regardless of resource and do not allow the user to filter on resources

1. Select None from the Resources column drop-down. The rest of the properties on the page will not affect what is shown.

Table 8: Possible Resource Options