Code, Code, Revolution!
I recently banged my head against this one. I wanted a list of past meetings and another list for upcoming meetings in my meetings workspace. The calendar is picked up from the parent site using a DataFormWebPart and the “Connect to another library” function. This was all well and good, however, I needed the workspace url to link to the other meeting workspaces. With the list connected there is a field in the data source named Workspace, but that’s a boolean and there is no url to be found. Looking at the Xpath in SharePoint Designer for that field it points to @WorkspaceLink. The trick is to add the property “IncludeHidden” to the SPDataSource object for the web part and find the url by selecting @Workspace.

Unfortunately, SharePoint Designer will throw an error at you for doing this when the list is not located in the same site as your webpart. But the end result in SharePoint will be glorius.
Here’s an example of how to display a link:
<a href="{substring-before(@Workspace, ',')}" title="{@Title}"> <xsl:value-of select="ddwrt:FormatDateTime(string(@EventDate) ,1033 ,'M/d/yyyy ')"/> </a>
With this blog I try to provide useful tips and solutions for programming .NET, Objective-C and more. My name is Björn Sållarp, and I love writing code.
vmrao
March 2nd, 2010 at 8:39 pm
Are you referring to Sharepoint 2010 or 2007 ? I don’t see ‘DataFormWebPart’ in 2010 ?
I am working with Sharepoint 2010. I have a Parent site and a Meeting Site with Calendar application as Subsite to it. The Subsite hosts one or more meetings every month and the corresponding meeting minutes are posted to a document library web part on the page. I need to display the files corresponding to the most recent meeting automatically on the parent site home page.
How do I do that ?
I tried Content Query Web Part but could not figure out
how to bring in the latest files from the Document Library.
In my case, whenever a new meeting is created through Meeting workspace/Calendar application, a Sub folder (3 for the third meeting) is automatically created under ‘Document Library’ for the new meeting.
While adding ‘Content Query Web Part’ to the parent site, I selected the ‘Document Library’ corresponding to the ‘Meeeting workspace’ but I am not sure
how to proceed from here to bring the latest files (Document Library/3 folder or whatever is latest).
Thanks for any help / info that you can provide.
Björn Sållarp
March 9th, 2010 at 10:04 pm
@vmrao
I am referring to SharePoint 2007. I haven’t had much time to work with SharePoint 2010 yet but I am surprised if the DataFormWebpart has been removed. That would be a big breaking change in 2010. DataFormWebpart is added through SharePoint Designer, have you looked for it there? Sounds like maybe you have just looked in the web part gallery?
// Björn