SharePoint explorer view is slow or freezes your desktop


Commonly we hear issues regarding de Explorer View not working, being slow, desktop freeze/hang. I am pleased to announce that the issue can you fixed pretty easy by tweaking your automatic proxy detection configuration in Internet Explorer (IE).

Note that when automatic proxy detection is used within your company network you will probably not encounter this issue. So it is safe to turn off. But be warned when you are traffeling a lot between multiple company networks that sometimes automatic proxy detection is required for a functional internet connection.

Read this post of Jeroen van Ree, which describes how to turn off automatic proxy detection to resolve this issue.

Use the calculated field to show weeknumber in SharePoint 2010


A common issue I’ve encountered is how to use the week number of a date in SharePoint. The most common use of the week number within SharePoint is to filter views or grouping of information based on the current date. Also today we were struggling again with some weeknumber code for SharePoint which was not returning the valid weeks for the standard used in the Netherlands.

In Europe week 1 starts on the Monday of the week in which 4th January falls. In other words, week 1 starts on the Monday of the week that contains the first Thursday of the year. This can be represented by the following formula:


=INT(([datecolumn]-DATE(YEAR([datecolumn]-WEEKDAY([datecolumn]-1)+4);1;3)+

WEEKDAY(DATE(YEAR([datecolumn]-WEEKDAY(datecolumn-1)+4);1;3))+5)/7)

Which is something like

  • Calculate the distance between the beginning of the year (with regard of the start of week 1) to the datecolumn
  • Add the day of the week of the 1st January of the datecolumn year added with 5 (Thursday)
  • Divide by number of days in a week (usually 7 😉
  • Floor by doing a cast to INT

When week 1 starts in the week of the 1st January (USA Standards) you can use the following code.


=INT(([datecolumn]-DATE(YEAR([datecolumn]),1,1)+

(TEXT(WEEKDAY(DATE(YEAR([datecolumn]),1,1)),"d")))/7)+1

Which is something like

  • Calculate the distance between the beginning of the year to the datecolumn
  • Add day of the week of the 1st January of the datecolumn year
  • Add divide by number of days in a week (usually 7 😉
  • Cast to integer (is Floor)
  • Add one day

Beside the use of the weeknumber based on a date column, you probably want to use the current date within your formula. To use the [Today] variable in a calculated column you need to use the following workaround. Without using this workaround you will get the error that you can’t use variables like Today and Me in a calculated column.

  • Add a column named Today to the list where you want to use the variable
  • Add a calculated column with the weeknumber calculation using the Today value (which will initially be the column value of Today)
  • Remove the column named Today

Every time you want to change the calculated column you need to repeat the steps in the same order. Good luck!

How to disable mobile view in SharePoint 2010


A common question by our customers is to disable de mobile view of SharePoint 2010. The simple interface is just to simple for advanced devices we use nowadays. There are multiple ways to disable the mobility feature in SharePoint 2010. To disable the mobile view for all devices you can use the first described method (especially used for publishing websites), if you just want to disable the view for specific devices use the second method.

Modifications to the web.config file

Pros

  • Single modification for all devices
  • Can be part of a SharePoint solution (using code)
  • Not overwritten during Service Pack / Cumulative update

Cons

  • No individual handling

Go and edit the web.config file of the site (e.g C:\Inetpub\wwwroot\wss\VirtualDirectories\<webapp>)

Add the following code to the configuration/system.web node

<browserCaps>
  <result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
  <filter>isMobileDevice=false</filter>
</browserCaps>

Or you can modify the compat.browser

Pros

  • Individual handling of mobile devices / browsers
  • Can be part of a SharePoint Solution (using code)

Cons

  • Overwritten during service pack

Go and edit the compat.browser file of the site (e.g C:\Inetpub\wwwroot\wss\VirtualDirectories\<webapp>\App_Browsers)

Modify isMobileDevice to false.

<capability name="isMobileDevice" value="false"/>