“Failed to load the workflow” Message in SharePoint Designer

I’m working at a new client and just getting the machine that they have me using working the way I like it.  I tried to open a workflow in SharePoint Designer and got the popup dialog: “Failed to load the workflow.”  (I had already loaded .NET 3.0 to get the Workflow Foundation Classes.)
A little searching, and I found the answer in Scott Muller’s blog: Navigate to C:\Documents and Settings\<your user name>\Application Data\Microsoft\SharePoint Designer\ProxyAssemblyCache and delete the existing folder (12.x.x.xxxx).  (You’ll have to shut down SharePoint Designer for the delete to work.)  I’m not sure why it works, but it works!

Known issue: Office 2007 on Windows Vista prompts for user credentials when opening documents in a SharePoint 2007 site

If you’ve been using Office 2007 on a Vista machine for as long as I have, you may have just gotten used to the extra credential prompts when you open Office documents from SharePoint 2007.  Well, Microsoft considers this a "known issue", but it’s not clear when it may be resolved for good, though it may be in Vista SP1.

In the meantime, there is a hotfix you can get, but you must ask Microsoft for it.  See the article entitled ‘You are prompted to enter your credentials when you access an FQDN site by using a Windows Vista-based client computer that has no proxy configured’ for the details.  The hotfix will only work for the SharePoint sites that you specify in the registry, so it is just a temporary workaround.

SharePoint Data View Web Part Extension Functions in the ddwrt Namespace

Serge van den Oever wrote this MSDN article about the functions that are available in the ddwrt namespace.  He wrote it for SharePoint 2003 and posted it to MSDN in October 2005, but I’ve never found a newer or better reference for MOSS.  I’ve used Serge’s postings many times to help solve challenges, and I recommend him if you ever run across them.

I’ve found a few additions to Serge’s list below, but I haven’t been able to find documentation for most of them:

Function   (ddwrt:) Called with   (example) Result
amkeyfield ddwrt:amkeyfield=”ID” ???
amkeyvalue ddwrt:amkeyvalue=”ddwrt:EscapeDelims(string(@ID))” ???
ammode ddwrt:ammode=”view” ???
cf_ignore ddwrt:cf_ignore=”1″ ???
EscapeDelims ddwrt:EscapeDelims(string(@ID)) ???
EcmaScriptEncode ddwrt:EcmaScriptEncode(string(@ID)) Encodes a string   into the ECMAScript format.

Here are a few excerpts from Serge’s article (any references to FrontPage are still valid for SharePoint Designer):


Microsoft Windows SharePoint Services provides the powerful Data View Web Part that can perform an Extensible Stylesheet Language Transformation (XSLT) on XML data retrieved from a data source. When you are working with a Web site based on Windows SharePoint Services from within Microsoft Office FrontPage 2003, you can use the Data View Web Part to do the following:

  • Define a query and data source from which to retrieve the XML data. Data sources can be SharePoint lists or external databases such as Microsoft SQL Server.
  • Define the XSLT transformation that converts XML retrieved from the data source into HTML. FrontPage offers a WYSIWYG experience for editing these XSLT views, including live data preview.

During the XSLT transformation process, the Data View Web Part uses an XSLT extension object that provides several functions in the ddwrt namespace. These functions perform tasks such as accessing properties of a SharePoint list or firing events to connected Web Parts. This article describes the functions implemented by the extension object.

Following is information about the set of functions implemented in the ddwrt namespace. These functions are prefixed with ddwrt in the XSLT code that is generated by FrontPage.


Rolling Up Content in SharePoint Using the Data View Web Part (DVWP)

In a recent post, I pointed out a way to roll up calendar entries using the Data View Web Part (DVWP).  That approach works if you have a fixed set of calendars for which you’d like to display the roll-up.  But what if you’d like the roll-up to be dynamic, i.e., have it display events for any new calendars that are created below a certain place in your site hierarchy?

Well, the way to do this is still using the trusty old DVWP (how could we live without it?!?!?!).  There are several DataSourceModes that are available in the DVWP that aren’t exposed in the SharePoint Designer interface.  (ListofLists, Webs, and CrossList modes. ListsofLists and Webs modes show the collection of lists and the collection of subsites for a given site.)  The mode that we need here is CrossList, which allows us to display items across lists below a certain point in the site hierarchy.

Here are the basic steps:

  • Set up your DVWP so that it has the display that you want for all of the lists, but do it the way you normally would for a single list. (i.e., pick one of your lists and make everything pretty for it alone.)
  • Now, if you aren’t already there, switch to code view, and in the code for your DVWP find the DataSourceMode property and change it from List to CrossList.
  • Right after that property, you’ll see the SelectCommand property.  This is the code that tells the DVWP what query to use for the SPDataSource.  Add <Webs Scope=’Recursive’></Webs> immediately after the opening quote, and leave the rest of the SelectCommand as it is.
  • Immediately after this section, you will see values for <SelectParameters>, <DeleteParameters>, <UpdateParameters>, and <InsertParameters>.  You can delete all of these, as they are not relevant to the CrossList mode.
  • Down a little further, you’ll see the <ParameterBindings> section.  Make sure that the line <ParameterBinding Name=”WebURL” Location=”None” DefaultValue=”/sitename/subsitename/”/> reflects the “root” from which you’d like the rollup to work.  (i.e., the DVWP will shown all items from this site and below — That’s what the Recursive scope you put into the SelectCommand does.)
  • Lastly, go a little further down and make sure that the path in the line <xsl:param name=”WebURL”>/sitename/subsitename/</xsl:param> matches the one above.
  • You can also remove any references to ListIDs, as they aren’t relevant.

If you’ve done everything right, you should see items returned by the DVWP that come from all of the like-structured lists below the site you’ve indicated.  You can continue to make formatting changes in the XSL, but to me it seems easier to get it at least close to right before you switch to CrossList mode.

NOTE: I posted an update to this post on September 21, 2008.  You should read that followup in conjunction with this post.

Comparing Dates in SharePoint Using XSL

Especially when you are using Data View Web Parts (DVWPs), but anytime you are using a Web Part that allows custom XLS to control display, you may want to do a test on dates.  Doing this is relatively easy if you know a few of the ddwrt namespace date functions.

In this example, let’s say that you’d like to display calendar events that occur today or later.  (Old calendar events aren’t of much use to display.)

The first step is to get today’s date.  You can do this with the following XSL:

<xsl:value-of select="ddwrt:Today()">

(’02/19/2008′ if your language is set to 1033)

You can also get the full ISO date and time with:

<xsl:value-of select="ddwrt:TodayISO()">


For comparison purposes, though, you’d like to have the date in YYYMMDD format.  You can do this conversion with the FormatDateTime ddwrt function:

<xsl:value-of select="ddwrt:FormatDate(string(ddwrt:Today()), 1033, 'yyyyMMdd')">


So, to compare your event date to today’s date, it’s a quick test:

<xsl:if test="ddwrt:FormatDate(string(ddwrt:Today()), 1033, 'yyyyMMdd') &lt;= ddwrt:FormatDateTime(string(@EventDate), 1033, 'yyyyMMdd')">