2

I'm trying to figure out how I'd go about create 5 calendars. Where the 5th calendar would simply be a combination of the 4 calendars and be color coded to reflect each calendar. Meaning cal 1 = blue, cal 2 = red, cal 3 = green, cal 4 = yellow. However, the 4 calendars are not on the same site but are in the same site collection. Is this possible without 3rd party software.

5

In SharePoint 2010 (and I think 2013) you can use Overlays. On the Calendar ribbon there is an Overlays button which allows you to add Calendars from other sites - or even just views from a single Calendar. You can choose different colours for each. And they all appear as one.

1

You could create workflows to add/edit/delete one calendar based on the changes of the others.

For example:

  • if event added on calendar (a,b,c), then add event to calendar d.
  • if event edited on calendar (a,b,c), then edit event to calendar d.
  • if event deleted on calendar (a,b,c), then delete event to calendar d.

Or, do the reverse. Everyone adds to "calendar d" and it updates the other calendars. Ideally, all the fields would be the same.

For the color coding we used a calculated field with inline styling:

<span style="color:red">[Title]</span>

The calculated field to choose the "Color" might look like this:

=IF(calendar="1","red",IF(calendar="2","blue",IF(calendar="3","green",IF(calendar="4","orange",""))))

The calculated field to choose the "ColoredTitle" might look like this:

="<span style='color:"&Color&";'> "&[ColoredTitle]&"</span>")

Of course, you will have to include javascript to turn the "&lt" into "<" and "&gt" into ">", because sharepoint changes brackets to escaped characters. Then use this JQuery script:

<script> 
$(document).ready(function() {
$('.ms-formlabel').each(function() {  
    if (this.innerHTML.indexOf('&lt;') > -1)
       {
         this.innerHTML = this.innerHTML.replace(/&lt;/g,'<').replace(/&gt;/g,'>'); 
       }
    });
}); 
</script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.