Tuesday, January 27, 2015

Customized color code calendar in SharePoint 2013


To create a color coded calendar using the out of the box SharePoint Calendars Overlay feature, a Site Owner will need to:
1.  Configure the default Calendar column, Category.
2.  Create a view for each category entered.
3.  Create a New Calendar for each view created per category.

1. Configure the default Calendar column, Category.


To modify the Category column, navigate to the Calendar to be modified.  Access its List Settings via the Ribbon, on the Calendar tab, select List Settings.
 





In the Columns section, double-click the Category column to open and modify.













In the Additional Column Settings section, input few categories.
Note:  More than ten categories can be entered, but only ten views can have colors assigned to them.





















2. Create a view for each category entered







 Create the first new view.  Start from the existing Calendar view.














Name of the view - Category1
Set the view’s filter to display only items that are assigned to the first category type, Category1.  Select Ok to save and continue.
Repeat Step for Category choices Category2 and Category3.














Modify default Calendar view.







Category is equal to "blank"













3.Create a New Calendar for each view created per category

Navigate back to the Calendar list.  Ensure the Calendar view is displaying.  Access the Calendar settings via the Ribbon, from the Calendar tab, select Calendars Overlay.






In the Category Overlay settings, select New Calendar.
For each category type being assigned a color code, create a New Calendar and assign the appropriate category list view .











Name the New Calendar (In this example I am naming the Category1).  Next, select a color code, then input the web URL of the site the calendar is located on (i.e. http://sitename.com, or http://sitename.com/subsite, etc.) and hit Resolve.
Note:  After hitting Resolve all Calendar lists in the site will now be available to select in the List drop down, and all list views per the selected calendarwill populate in the List View drop down.


















Repeat Step for the remaining calendar overlay views (New Calendar).  When complete, the list of Additional Calendars will display as below.











The views being used to display the color coding are listed in the Quick Launch under Calendars in View.















How to add different colors to Calendar Overlay?

Tuesday, January 20, 2015

Hide All Day Event and Recurrence fields from calendar in SharePoint 2013

How to simple hide fields "All Day Event" and "Recurrence" from SharePoint calendar with javascript? Here is a solution.


Open your Calendar.
Navigate to Calendar tab->expand Form Web Parts->and click on Default New form.







In Default New form edit page, click on Add a Web Part and select the Content Editor Web part.










From Content Editor Web part, Click on Click here to add new Content.










Now select Edit Source from ribbon and add java script to HTML

<script type="text/javascript">

_spBodyOnLoadFunctionNames.push("hideall()");
function hideall()
{
HideField("Recurrence");
HideField("All Day Event");
}

function HideField(title){
var header_h3=document.getElementsByTagName("h3") ;

for(var i = 0; i <header_h3.length; i++)
{
   var el = header_h3[i];
   var foundField ;
  if(el.className=="ms-standardheader")
   {
       for(var j=0; j<el.childNodes.length; j++)
       { 
           if(el.childNodes[j].innerHTML == title || el.childNodes[j].nodeValue == title)
           { 
               var elRow = el.parentNode.parentNode ;
               elRow.style.display = "none"; //and hide the row
               foundField = true ;
               break;
           }
       }        
   }
   if(foundField)
       break ;
}
}
</script>
Save.
That's it!

Friday, January 16, 2015

"Connect to Outlook" disabled, greyed out - SharePoint 2013

SharePoint users unable to connect to any SharePoint 2013 list or calendar to Outlook 2013.  The "Connect to Outlook" Ribbon button is always greyed out. Here is a solution!























Resolution:

-Open the site collection on which you are not able to ‘connect to outlook’

-site actions

-site settings

-manage site features

-There is a feature called "Minimal Download Strategy"



-Deactivate this feature

Once this feature will be deactivated then try to ‘connect to outlook’.

Tuesday, January 13, 2015

Group by Year and Month using calculated column in SharePoint 2013

How often have you wanted to group the data that you have created in a SharePoint List, by Month or Year, but not sure how to get that information without asking the user to capture it for you? The user experience should be simple and not become more and more cumbersome as you want more robust reporting. You can solve this problem easily by using use a Column with a calculated field.
The only criteria needed, to enable you to group by Month or Year, using a calculated column, is that there must be a base column in Date Format to calculate from.

In the list or document library created two columns, one for Year and one for Month.

For Year the formula will be:
=TEXT([DataField];"yyyy")





















For Month column, the formula will look like below:
=TEXT(MONTH([DataField]);"00")&" "&TEXT([DataField];"mmmm")

If you need the three letters of the month name, replace "mmmm" with "mmm"




















Now create the view, in the View the Group By condition should be look like below.












That's it!