Archive for the ‘Feature’ category

InfoPath Webpart – Host InfoPath Templates in WebPartPages – Free

February 12, 2009

First of all why? If for nothing else there are products that are sold out there that literally cost hundreds of dollars that do exactly what I am going to describe in this post (and in some cases have extra limitations).

If you want to host an InfoPath form template embedded in a SharePoint webpart page it is a fairly easy process and I noticed a few glitches or extra steps in the articles I found on this so I figured I would iterate my own perspective.

There is a webpart  included in the Enterprise version of Microsoft Office SharePoint Server. The webpart is called the XmlFormView: It is powerful, simple, and relatively easy to use. However it is not in the webpart gallery by default there are a few steps you need to do to enable this nice little webpart in your SharePoint web application and then the targeted site collection.

Step One – Modify the Web.Config:

The first step is to modify the web.config file with an extra safe control entry. (Web.config files are stored typically in “C:\Inetpub\wwwroot\wss\VirtualDirectories\PORT NUMBER  or host header name” (Back up the web.config first if you want, but this is a pretty safe change.) The entry you are going to add is shown below and goes in the <SafeControls> section (in case you didn’t guess that :P):

<SafeControl Assembly=“Microsoft.Office.InfoPath.Server, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.Office.InfoPath.Server.Controls” TypeName=”*” Safe=”True” />

NOTE BEFORE YOU COPY – WordPress messes with my ” characters I think, so make sure you either type this out personally, or at least check it before copying and pasting into your web.config (otherwise you’ll get a server error.)

Save the web.config file after you change it and load up the target site collection in a browser.

Step Two – Make the WebPart Available For Use:

Access Site Settings for the root of the site collection.


Select the WebPart’s Gallery.


Click New.


Find the Microsoft.Office.InfoPath.Server.Controls.XmlFormView. Select the checkbox beside it and click the populate Gallery button.


Step Three (Optional) – Change the WebPart Details:

Now let’s change the webpart’s properties because the name isn’t very helpful (XmlFormView).


Just put in whatever details you want. This is also where you should probably set this webpart up so that only certain groups can add it who have the training and knowledge to do so.


Step Four – Add the WebPart to a Page and Configure It:

Now all we have to do is navigate to a page and add the webpart. Simply click the gold add webpart band on the target page when in edit mode and scroll down to the webpart we added (and renamed :)).


After clicking Add you will recieve an error. Don’t worry about it, just hit close. The webpart will show on the page like so.


Modify it’s properties and add the following three important things:

  1. Change the EditingStatus to Edited or Init (as desired) since Closed probably isn’t what you want.
  2. Set the XSNLocation to wherever your xsn form is being stored. In my example here I have deployed it to a form libary called Library.
  3. Set the save location for where the form should save to. In my example I actually have the option DisableSave in there so this isn’t necessary (since I am saying to disable the ability to save from this part). Remember your xsn’s submission rules normally dictate where the form will be saved and stored.


And voila the form should display like you always wanted.


Step Six – After Effects:

Tell your boss you just saved the company several hundred dollars and did an amazing job.

Hope this helps someone out there (and doesn’t offend any of the ISV/product companies who do something like this),
Richard Harbridge

Add Some “Sex Appeal” with Silverlight and JQuery

January 23, 2009

Most of you are hopefully aware of Jan’s “SmartTools” for SharePoint on codeplex: However just in case you aren’t I highly recommend taking a look at them. Recently Jan uploaded new versions of these tools (, and I have personally used some to spread ideas or awareness of what silverlight/jquery can do in SharePoint (along with a few tweaks of my own).

One thing that’s really nice about the silverlight chart controls (as an example) is how they can generate ‘sex appeal’ for that presentation or proposal you are working on. It’s one thing to see functionality, and potential, but when you see cool charts, graphs, and interactive elements it normally generates alot of good excitement, and since Jan’s done most of the work to give you some examples (thanks Jan ;)) you just need to install, do a bit of configuration and voila, you have some cool content features that you can actually use right away.

There are plenty of other great silverlight and jquery projects and extensions for SharePoint out there as well.

Some Other Silverlight posts or projects I recommend taking a gander at:

  1. (Silverlight Blueprint for SharePoint)
  2. (Great article on using Silverlight WebPart’s and an exaple media player one.)
  3. (SharePoint Silverlight Browser)

Some Other jQuery posts or projects I recommend taking a gander at:

  1. (Good intro and real solution for a SharePoint Issue using jQuery)
  2.,guid,c26d2d3f-f389-44d7-bd8f-2fae5c8a1415.aspx (Example of how to use it for a ‘select all’ functionality.
  3. (Inject JS and CSS fragments based on context of page.)

If you haven’t played with Silverlight or jQuery yet then hopefully this will help motivate you, or help you understand some ways it can be used (with minimal effort),
Richard Harbridge

Christmas Fun with SharePoint

December 11, 2008

A long ways back Todd Bleeker released a cute content editor webpart which had javascript which made it ‘snow’ in SharePoint. One of those nice things to get your SharePoint team in the Christmas mood.

It still works fine in SharePoint 2007 and everyone should feel free to use it. If you are having trouble importing a dwp file (advanced webpart options, and import) then you can also just manually copy and paste the following code into source view of a CEWP to get the same effect. 🙂

If you embed this code into your master page it will display for the entire site too..


Oh and before I post the code Andy Dale did a similar thing with the content query webpart but this one is a countdown! Found here:

Note: WordPress has replaced all my ” characters and ‘ characters, so when you copy this code make sure you change the quotes or the code won’t work. I have also added it for download here: in txt format.

<script type=”text/javascript”>

* Snow Effect Script- By Altan d.o.o. (
* Visit Dynamic Drive DHTML code library ( for full source code
* Last updated Nov 9th, 05′ by DD. This notice must stay intact for use
* Updated by Todd Bleeker for use within a CEWP Dec. 2005

//Configure below to change URL path to the snow image
var snowsrc=”;;

// Configure below to change number of snow to render
var no = 10;

// Configure whether snow should disappear after x seconds (0=never):
var hidesnowtime = 0;

// Configure how much snow should drop down before fading (“windowheight” or “pageheight”)
var snowdistance = “pageheight”;

///////////Stop Config//////////////////////////////////

var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

function iecompattest()
return (document.compatMode && document.compatMode!=”BackCompat”)? document.documentElement : document.body

var dx, xp, yp;    // coordinate and position variables
var am, stx, sty;  // amplitude and step variables
var i, doc_width = 800, doc_height = 600;

if (ns6up)
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up)
doc_width = iecompattest().clientWidth;
doc_height = iecompattest().clientHeight;

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();

for (i = 0; i < no; ++ i)
// set coordinate variables
dx[i] = 0;

// set position variables
xp[i] = Math.random()*(doc_width-50);
yp[i] = Math.random()*doc_height;

// set amplitude variables
am[i] = Math.random()*20;

// set step variables
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();

if (ie4up||ns6up)
if (i == 0)
document.write(“<div id=\”dot”+ i +”\” style=\”POSITION: absolute; Z-INDEX: “+ i +”; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\”><a href=\”\”><img src='”+snowsrc+”‘ border=\”0\”><\/a><\/div>”);
} else
document.write(“<div id=\”dot”+ i +”\” style=\”POSITION: absolute; Z-INDEX: “+ i +”; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\”><img src='”+snowsrc+”‘ border=\”0\”><\/div>”);

// Main animation function
function showsnow()
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
doc_height=(window.innerHeight && snowdistance==”windowheight”)? window.innerHeight : (ie4up && snowdistance==”windowheight”)?  iecompattest().clientHeight : (ie4up && !window.opera && snowdistance==”pageheight”)? iecompattest().scrollHeight : iecompattest().offsetHeight;

// iterate for every dot
for (i = 0; i < no; ++ i)
yp[i] += sty[i];
if (yp[i] > doc_height-50)
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
dx[i] += stx[i];
document.getElementById(“dot”+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+”px”;
snowtimer=setTimeout(“showsnow()”, 10);

function hidesnow()
if (window.snowtimer)

for (i=0; i<no; i++)

if (ie4up||ns6up)

if (hidesnowtime>0)
setTimeout(“hidesnow()”, hidesnowtime*1000);


Hope someone else enjoys this one,
Richard Harbridge

Mobile ‘Limits’ for SharePoint

December 1, 2008

So I was playing with mobile views the other day and noticed that there seemed to be limits (Ellipses) on mobile views. When I say limit I just mean something that requires custom code and is not available out of the box. I could not seem to find an article that summarized the mobile ‘limitations’ so here they are.

Afterthought: Oh and an Ellipses is where it goes ‘…’ and cuts off text.

Mobile ‘Limitations’:

A very quick google search brought up the following table of what is limited for views of lists and libraries on mobile devices (from

What’s interesting (and terrific) here is the fact that this table is just the default values for these view limits, you can change them (more on that a bit later). This is what will render before it ‘cuts off’ with the ellipses.



Characters in the Web title of a list or library


Characters in a list or library name


Number of mobile views


Number of items displayed in a view


Characters in a list item title


Characters in a column name


Single-line text field type


Multiple-line text field type


Each choice in a choice field type


Number of options in a choice field type


Characters in each item in a lookup field


Number of options in a lookup list


Characters in a hyperlink or picture field


Characters in an attachment file name


Number of attachments (to list items) displayed


Characters in a calculated field


I also found out that certain lists do not render in SharePoint mobile views (example Discussion Boards). I do know that these four lists DO render in mobile views though.

  1. Announcements
  2. Calendar
  3. Tasks
  4. Shared Documents

So always curious I decided to look into why and how these values seem to function and what can be done, and lots can be done! The above limitations for the ellipses can be configured, and if you can develop on top of the work the SharePoint team has already done!

Fields (and Field Behavior in Mobile)

Fields themselves will display differently (or not at all) in Mobile views.

The following field types are not displayed in mobile list views:

  • Attachments field
  • CrossProjectLink field
  • Recurrence field

Only the following types of Computed fields are displayed in mobile list view pages:

  • LinkTitleNoMenu
  • LinkCheckedOutTitle
  • LinkFilenameNoMenu
  • LinkTitle
  • LinkFilename
  • LinkDiscussionTitle
  • BodyAndMore
  • PersonViewMinimal
  • NameOrTitle
  • URLwMenu.

For the following keep in mind that any control that exceeds a rendering limit becomes read-only even if it is nominally read/write.

Read-Only Controls in Mobile Forms

Windows SharePoint Services Field Type

ASP.NET Mobile Control


Single line of text


Same as ASP.NET control except for rendering of ellipses.

Multiple lines of text


Renders plain text of rich HTML text field type.



Same as ASP.NET control except for rendering of ellipses.



Leverages Windows SharePoint Services field type controls for format conversion.



Leverages Windows SharePoint Services field type controls for format conversion.

Date and time


Leverages code in Windows SharePoint Services field type controls for local date/time conversion.



Does not support presence or linking to user information.



Same as ASP.NET control except for rendering of ellipses.

Hyperlink or picture


Same as ASP.NET control except for rendering of ellipses.



Same as ASP.NET control except for rendering of ellipses.



The number of attachments to display is limited. Up to three attachments are displayed, which is set by a rendering limit.

Recurrence field


Same as ASP.NET control except for rendering of ellipses.

Read/Write Controls in New or Edit Forms

Windows SharePoint Services Field Type

ASP.NET Mobile Control


Single line of text


Displays read-only Label control the same as in a Display form if the data to edit exceeds a maximum character limit.

Multiple lines of text


Displays read-only Label control the same as in a Display form if the data to edit exceeds a maximum character limit. If the markup language of the current browser is not Wireless Markup Language (WML), theTextBox control is used. The TextBox control does not support rich HTML text formatting, and so in the Edit form, if the field type is rich HTML text, the field is rendered as a read-only control. In the New form, however, the TextBox control is used even when the field is in rich HTML text format.



Supports drop-down list boxes only, and allows multiple selections. In the New form, if the number of choice options exceeds a maximum number, the first n options (n = maximum number) are displayed and a warning message is displayed below the options. In the Edit form, a read-only Label control is displayed.



Does not provide minimum-maximum value range validation.



Does not provide minimum-maximum value range validation.

Date and time


Displays description text. Does not support the calendar date picker. The current locale in Windows SharePoint Services determines the date and time input format, but the current calendar type is ignored.



The cutoff maximum limit behavior is the same as for the Choice field type.



Same as ASP.NET control except for rendering of ellipses.

Hyperlink or picture


Does not display description text or allow the typing of descriptive text in the Display, Edit, or New form.

If the display name of the hyperlink or picture exceeds a maximum character limit, the remaining characters are truncated and an ellipsis () is appended. The URL itself is not truncated.



Read-only in Edit form. Does not support the New form for document libraries.

(Above from:

How to Configure a View Limitation (for Ellipses):

Rendering limits are determined in one of two ways:

  1. Through default configuration settings that are set in the mobile web.config file.
  2. Through the Properties property of the SPWeb class that can be configured per Web site through the object model.

Modifications you make to web.config are global to a front-end Web server, while changes you make through Web properties are scoped per Web site, which are not inherited by subsites.

So… to change it for an entire web application just modify the web.config for the web application you want these limits to be adjusted on.

Each limit setting is represented as a key-and-value pair within the <appSettings> section of the web.config file—for example, <add key="mobile_webtitlelimit" value="20" />. If the configuration for a text length limitation is set to 0 or no entry is specified, ellipsis rendering does not work.


Property bag settings for a particular site override the global settings in web.config. So if you modify the property bag for a specitic web you can have it changed for that web. Just use (C#) code like this:

SPWeb webSite = SPContext.Current.Site.AllWebs["WebSite"];
SPPropertyBag propBag = webSite.Properties;
propBag["mobile_listtitlelimit"] = "15";

Using the above code you should also keep in mind that you requires a using Microsoft.SharePoint, and Microsoft.SharePoint.Utilities namespaces, and you must insert a FormDigest control in the default.aspx page of the custom web application.

The following table describes the rendering limit parameters used in mobile pages and shows their default maximum values. The unit of measure is character, regardless of half-width or full-width character.




Base Rendering Limit


Base limit for text length


System Rendering Limits


Flag for ellipsis rendering on Display form



Limit for the number of fields to show on New and Edit forms



Limit for the title of each field on forms



Limit for the item title shown on forms



Limit for the List title on list views



Limit for the number of items to show on list views



Limit for the number of Views to show in the View drop down list



Limit for the length of View names in the for View drop down selector



Limit for the length of the Web site title shown on the top page of the Web site


Field Related Limits


Limit for the number of attachments to show



Limit for the file name of an individual attachment



Limit for field value length for Calculated field



Limit for the number of options to show on the New and Edit forms for a Choice field



Limit for the name of any individual on the New and Edit forms for a Choice field



Limit for the length of any individual field value on list views



Limit for the field value length for File fields



Limit for the number of options to show on the New and Edit forms for a Lookup field



Limit for the name of any individual option on the New and Edit forms for a Lookup field




(The above is one word, I cut apart so it would display in my blog properly)

Limit for the number of selected choices, in a multi choice field, to show in list views and item Display forms



Limit for the field value length for text fields with multiple lines




(The above is one word, I cut apart so it would display in my blog properly)

Limit for the number of selected lookup values, in a multi value lookup field, to show in list views and item Display forms




(The above is one word, I cut apart so it would display in my blog properly)

Limit for the number of selected users, in a multi user field, to show in list views and item Display forms



Limit for the field value length for single line text fields



Limit for the length of the text for a URL field (the URL itself is not shown and not truncated)



Limit for the number of options to show on New / Edit form for a user field



Limit for the length of any individual option for a user field


(Above taken from:

Looking for more information on Mobile Settings, and Development in SharePoint? Look here: (Most of the information above was taken from this area.)

Anyways I hope this helps someone when they work with Mobile Views in SharePoint,
Richard Harbridge

Name.dll Prompt in IE 7 Fix (Feature, and Easy Deployment)

December 1, 2008

Great news! Ever receive that name.dll prompt on a SharePoint site of yours when viewing in IE 7?

This issue occurs if the Name ActiveX control (Name.dll) is not added to the list of preapproved controls in Internet Explorer 7. The Name ActiveX control is included in the 2007 Microsoft Office system.

The way to fix it? They have 3 ways, add the site to trusted sites, change the registry, or modify each master page.

Typically option 3 is most appealing. (Quick note, make sure you comment all function lines in their example, it is wrong and if you don’t will result in a js error.) However it has a significant drawback. Imagine how much effort it would take to update hundreds of site collections with many customized master pages?

The good news is that just a short time ago Larry J. Riemann wrote a terrific feature for codeplex based off of Randy Drisgill’s workaround (in response to issues people were having):

The feature (which makes me happy) is located here:

What is great about this feature is that it is scoped to the web application level so the number of site collections, and sub sites don’t matter. What’s more the way it’s designed should not be effected by any customizations or the number of master pages. Making it a very appealing resolution.

Find out more about the codeplex activex override at Larry’s blog here:

Warning: Through testing this feature I have noticed it causes critical errors when using InfoPath Form Services.

Thank you Randy and Larry we all appreciate it,
Richard Harbridge

Download SharePoint Library as a Zip File Feature

November 19, 2008

Back in October I saw this but just had the chance last night to test it out. Very cool little feature on Codeplex that allows you to zip an entire SharePoint library.


Codeplex Site:

Go community content and features,
Richard Harbridge

InfoPath Field Value Modified from SharePoint Datasheet

November 13, 2008

I just stumbled upon this today and thought it was neat. I probably should have noticed it earlier, but it involves a little checkbox that I overlooked until today. (Much to my embarassment.)

When publishing an InfoPath form to SharePoint there is a little checkbox on the field’s properties (when positioning where the field value will be saved that allows you to actually update the field from datsheet view or the properties page. Awesome!


Also Jan noticed this ages ago so I should reference his post here:

Very cool stuff,
Richard Harbridge

Use Outlook for SharePoint Tasks

September 18, 2008

One of the more powerful components of SharePoint is it’s built in task list. This comes in especially useful if you have project spaces, or project management sites. The problem I often ran into was the fact that most of the time you have users who use a variety of systems for task management, whether that be excel, outlook, or another non SharePoint system. I love the fact you can export SharePoint to excel, or show tasks in a datasheet providing users with a ‘similar to excel approach’ but the thing I love even more is how smoothly SharePoint task lists integrate with Outlook 2007.

Let me explain, basically you can manage, add, remove, and update any SharePoint tasks from Outlook, this includes workflow tasks, or specific project task lists. A wonderful benefit, and I know I personally use Outlook to manage all my tasks and events because it has so many wonderful reminder, and integration features with things like one note, or live meeting.

This also includes the ability to drag and drop tasks (just like Calendar events when SharePoint is synchronized with outlook) and copy existing task lists to SharePoint. This is something I really enjoy because I find it much easier to manage tasks in outlook as a manager, than I do in SharePoint (purely because of the time it takes to refresh pages etc and due to bandwidth). Using Outlook I can copy tasks from various list and use templated tasks which I just ‘assign’ to different team members.

Want to know how to do it? Here you go:

Hope this helps someone,
Richard Harbridge

Three Powerful Columns (Not many people know about.)

September 12, 2008

SharePoint has lots of terrific functionality. Some of it can be fairly difficult to find. The three columns this post is about are definitely difficult to find and many SharePoint developers and people I have talked to do not know they even exist. I have decided to write a quick post on these columns so that everyone can know  a little bit more about these powerful field controls SharePoint has built.

In a typical SharePoint list (with features turned on) we see the following column field types to create our column based on:

What’s interesting is that within the site columns list we get the option of a few extra field types for our columns. In particular the following three are available and are otherwise unavailable in a list’s create column view.

So what do these columns do?

Select This

To Display This

Full HTML content with formatting and constraints for publishing

Columns that display the contents of the HTML Editor Web Part. Content and formatting constraints may be applied to the column.

Image with formatting and constraints for publishing

Columns that store links to images defined in the item properties. Each column displays an image, and optional formatting and constraints may be applied to it.

Hyperlink with formatting and constraints for publishing

Columns that store hyperlinks and display the names of hyperlinks defined in the item properties. Link formatting and constraints may apply.

Here are some common examples of when these columns can come in handy. Let’s say you have a publishing site and are creating content via list technology. So to create a new article and show this article in the news section of your site you populate Rich Text and HTML. The problem in a publishing environment is sometimes you need to limit the options of the people creating content. This way it ensures that everything shows up according to your colour schemas and the such. Well the “Full HTML content..” column can be used to do just that. Since you can modify the buttons available on this one it is possible to limit what functionality is available to users.

The image and link columns talked about here are also terrific. Provinding users with a more user friendly way of adding images, or links (with browse dialogs and the such) rather than having to manually input the URL of the image or web reference.

Here are the columns in action:

Again with some content, note that I can change the size of the image (among other things) which is more than the hyperlink (formatted as an image) can provide.

And here you can see them in Datasheet view where we can see the actual content that would be rendered via XSLT in a content query web part or data form web part.

I highly recommend taking a look at these columns if you haven’t already as they can really help in deployments of publishing site solutions and like I said, they are kind of hidden away since they are only visible typically in the create site column page.

Note: If you are having trouble finding these site column types (from the list, or wish to add them to a list) keep in mind that the columns I mention in this post are all only available under the “Site Columns” and require you to create a new site wide available column before you can add it to a list.

Update: To clarify/respond to questions I have recieved tossing some related links here.

Wishing you all of the best,
Richard Harbridge

SharePoint List Template IDs, RegistrationIDs, List Template Type IDs

August 26, 2008

I always lose track of these and have to sift through MSDN or my bookmarks to find it. Hoping that this will help someone else find this listing.

  • 100 Generic list
  • 101 Document library
  • 102 Survey
  • 103 Links list
  • 104 Announcements list
  • 105 Contacts list
  • 106 Events list
  • 107 Tasks list
  • 108 Discussion board
  • 109 Picture library
  • 110 Data sources
  • 111 Site template gallery
  • 112 User Information list
  • 113 Web Part gallery
  • 114 List template gallery
  • 115 XML Form library
  • 116 Master pages gallery
  • 117 No-Code Workflows
  • 118 Custom Workflow Process
  • 119 Wiki Page library
  • 120 Custom grid for a list
  • 130 Data Connection library
  • 140 Workflow History
  • 150 Gantt Tasks list
  • 200 Meeting Series list
  • 201 Meeting Agenda list
  • 202 Meeting Attendees list
  • 204 Meeting Decisions list
  • 207 Meeting Objectives list
  • 210 Meeting text box
  • 211 Meeting Things To Bring list
  • 212 Meeting Workspace Pages list
  • 301 Blog Posts list
  • 302 Blog Comments list
  • 303 Blog Categories list
  • 1100 Issue tracking
  • 1200 Administrator tasks list