Thursday, March 29, 2007

Don't Use the 3GB Switch With SharePoint

According to the knowledge base article 933560, use of the /3GB switch is not supported on servers running SharePoint 2007

How to Track New Sites Created in SharePoint

As the "site created" event isn't offered in the set of exposed events, it seems that the way to log, audit or carry out some other action on the creation of a new site is to use Feature Site Template Association.

The post entitled Customizing MOSS 2007 My Sites within the enterprise by Steve Peschka explains how to do this with a nice example. Includes an explanation of how to run .net code, too, using "feature provisioning code callout".

Phew, so much to learn!

Wednesday, March 28, 2007

Governance of a SharePoint Environment

I am in the process of writing a governance document for a major SharePoint deployment. Along the way I am finding that the more I research this area, the more there is to consider. Just as well several days have been budgeted for the task!

Here are some of the materials I have found useful:
As I find other useful stuff, I'll add it here.

Thursday, March 15, 2007

Formating Dates, Times and Currency in Data View Web Parts

If you find that the format of dates, times and currencies are incorrect in your data view web parts, you probably will need to modify the Locale ID being applied in the XSL format statements. For example, the formatdate() XSL method may have the default "English-United States" LCID of 1033.

Note that to change the formatting in other views - for example in a list view - adjust the locale in the Regional Settings page of the Site Settings.

Use the Locale ID (LCID) from the following table to apply regional formatting:
Locale Description LCID Locale Description LCID
Afrikaans 1078 Icelandic 1039
Albanian 1052 Indonesian 1057
Arabic - United Arab Emirates 14337 Italian - Italy 1040
Arabic - Bahrain 15361 Italian - Switzerland 2064
Arabic - Algeria 5121 Japanese 1041
Arabic - Egypt 3073 Korean 1042
Arabic - Iraq 2049 Latvian 1062
Arabic - Jordan 11265 Lithuanian 1063
Arabic - Kuwait 13313 FYRO Macedonian 1071
Arabic - Lebanon 12289 Malay - Malaysia 1086
Arabic - Libya 4097 Malay – Brunei 2110
Arabic - Morocco 6145 Maltese 1082
Arabic - Oman 8193 Marathi 1102
Arabic - Qatar 16385 Norwegian - Bokmål 1044
Arabic - Saudi Arabia 1025 Norwegian - Nynorsk 2068
Arabic - Syria 10241 Polish 1045
Arabic - Tunisia 7169 Portuguese - Portugal 2070
Arabic - Yemen 9217 Portuguese - Brazil 1046
Armenian 1067 Raeto-Romance 1047
Azeri - Latin 1068 Romanian - Romania 1048
Azeri - Cyrillic 2092 Romanian - Moldova 2072
Basque 1069 Russian 1049
Belarusian 1059 Russian - Moldova 2073
Bulgarian 1026 Sanskrit 1103
Catalan 1027 Serbian - Cyrillic 3098
Chinese - China 2052 Serbian - Latin 2074
Chinese - Hong Kong SAR 3076 Setsuana 1074
Chinese - Macau SAR 5124 Slovenian 1060
Chinese - Singapore 4100 Slovak 1051
Chinese - Taiwan 1028 Sorbian 1070
Croatian 1050 Spanish - Spain 1034
Czech 1029 Spanish - Argentina 11274
Danish 1030 Spanish - Bolivia 16394
Dutch - the Netherlands 1043 Spanish - Chile 13322
Dutch - Belgium 2067 Spanish - Colombia 9226
English - Australia 3081 Spanish - Costa Rica 5130
English - Belize 10249 Spanish - Dominican Republic 7178
English - Canada 4105 Spanish - Ecuador 12298
English - Caribbean 9225 Spanish - Guatemala 4106
English - Ireland 6153 Spanish - Honduras 18442
English - Jamaica 8201 Spanish - Mexico 2058
English - New Zealand 5129 Spanish - Nicaragua 19466
English - Phillippines 13321 Spanish - Panama 6154
English - South Africa 7177 Spanish - Peru 10250
English - trinidad 11273 Spanish - Puerto Rico 20490
English - United Kingdom 2057 Spanish - Paraguay 15370
English - United States 1033 Spanish - El Salvador 17418
Estonian 1061 Spanish - Uruguay 14346
Farsi 1065 Spanish - Venezuela 8202
Finnish 1035 Sutu 1072
Faroese 1080 Swahili 1089
French - France 1036 Swedish - Sweden 1053
French - Belgium 2060 Swedish - Finland 2077
French - Canada 3084 Tamil 1097
French - Luxembourg 5132 Tatar 1092
French - Switzerland 4108 thai 1054
Gaelic - Ireland 2108 Turkish 1055
Gaelic - Scotland 1084 Tsonga 1073
German - Germany 1031 Ukrainian 1058
German - Austria 3079 Urdu 1056
German - Liechtenstein 5127 Uzbek - Cyrillic 2115
German - Luxembourg 4103 Uzbek – Latin 1091
German - Switzerland 2055 Vietnamese 1066
Greek 1032 Xhosa 1076
Hebrew 1037 Yiddish 1085
Hindi 1081 Zulu 1077
Hungarian 1038    

Wednesday, March 14, 2007

Office 2007 (including SharePoint) Resources

See Erika Ehrli's top ten list for a set of valuable Office resources - links to articles, blogs and whitepapers. Including a link to the Office 2007 Developer Posters which are pretty handy.

Javascript in the Onload Event for a SharePoint Page

The simple way to add JavaScript behaviours to a SharePoint page is to add a script block with the for and event attributes set to the relevant object and event.

For instance, to insert a value from the querystring into the page title, add the following script to the top of the PlaceHolderMain Content Place Holder block:

    <script type="text/javascript" language="javascript">
    function getQueryStringValue(qsName) {
var querystring =;
qsPair querystring.split("&");
(var i=0;i<qsPair.length;i++) {
var pair qsPair[i].split("=");
(pair[0].toLowerCase() == qsName.toLowerCase()) {
return pair[1];
return '';
    <script type
="text/javascript" language="javascript" 
for="window" event="onload">
document.title 'Details for ' + getQueryStringValue('supplier') + document.title;

Tuesday, March 13, 2007

Supplying the WebID to the Lists.asmx Web Service in SharePoint 2007

Useful tip from Ishai Sagi on how to supply the optional WebID argument when calling the Lists web service - by first making a call to the SiteData web service.

Monday, March 12, 2007

Create a Dynamic Title in a Data View Web Part Without Code

Well, sort of - this is a bit of a cheat, but the effect is satisfying in cases where users require no control over web parts on a page. All that is required is a little extra XSL. The beauty of this approach is that no web part needs to be written in C# or VB.Net, and that any data available in the data view can be used in the title.

First, set the Chrome Type for the web part to None. Then add a new row to the table in the Data View. The contents of the cell in the row will become the title.

The trick is to apply the standard Web Part title bar CSS styles to the new table. The fragment below shows the styles that need to be applied to the row and to the contents of the cell:

<tr valign="top" class="ms-WPHeader">
<td nowrap=""><h3 class="ms-standardheader ms-WPTitle"><span>Matching Suppliers</span></h3></td>

Thursday, March 8, 2007

Displaying a Document Icon in a Data View

To display the correct document icon in a dataview, use the following XSLT source:

<a target="_self">
<xsl:attribute name="href">
<xsl:value-of select="@FileRef"/>
<img border="0">
<xsl:attribute name="src">
<xsl:value-of select="ddwrt:MapToIcon(string(@HTML_x0020_File_x0020_Type),string(@File_x0020_Type))"/>

The MapToIcon method derives the correct icon name from the supplier document type (but note it returns only the icon file name, not the path).

Wednesday, March 7, 2007

Filtering a List by a Partial Match

On a SharePoint site I have been creating, a requirement is to display a list of Suppliers filtered by the first few letters that have been entered into a search box. One method to achieve this is using a Form Web Part and a Data View Web Part.

Add a Form Web Part to the page - in my case it is called "Search By Supplier". Next, in SharePoint Designer, add a Data View Web Part (called "Suppliers" in this case) that contains the Supplier Name column. A parameter is next added to the Data View Web Part - I have named it SupplierNameStart. This parameter will be used to tie the Web Part connection to a filter.

A new filter is added next to the Data View - the filter criteria is set so that the "Supplier Name field starts with [SupplierNameStart].

The final task is to create the web part connection. The wizard steps are as follows:
  1. Create a connection for the form web part. The "Search By Supplier" web part is to Provide Form Values To another part.
  2. The web part needs to Connect to Another Web Part on this Page
  3. Select the Suppliers web part as the target, and the target action to be Get Parameters From
  4. Choose columns - The column in the "Search By Supplier" web part is the text box name (in the HTML source of the Form Web Part). This column should be associated with the input of "SupplierNameStart" to the Supplier Web Part (i.e. the parameter).
And thus the supplier list is filtered by the letters entered into the form (when the go button is clicked)