In a previous post I blogged about the fact that when creating a custom DataSource using SharePoint Designer, the SelectParameters by default reference the ListId and then specifically the GUID. This creates a problem when exporting your customised page, since the ListId you reference will be lost and thus your DataSource will be practically useless.
Its seems that other people have been experiencing the same problem including Ishai who developed custom code to workaround the problem. In the same post, Donal mentioned that you can use the List Name rather than the Guid. This was obviously too much to resist, and I spent some time trying looking around to try and solve this problem. I came across this post SPDataSource and Rollups with the Data View. One of the comments said that besides the List Id you can also use the listname as a parameter to the Data Source. Therefore I modified my datasources such that they were similar to the below.
<SelectParameters>
<WebPartPages:DataFormParameter Name="ListName" ParameterKey="ListName" PropertyName="ParameterValues" DefaultValue="Announcements"/>
</SelectParameters>
</SharePoint:SPDataSource>
Thursday, 17 May 2007
SharePoint 2007: Solving the List GUID Export Problem
Posted by Unknown at 16:02
Labels: sharepoint 2007 list guid problem selectparameters listname