DataForm Web Parts - removing the GUID

DataForm web parts enabled us to put forms onto pages that can interact with SharePoint lists. Why would we want to do this? well one example is that we can hide the list and it's URL's , another is that the form can be designed to contain custom logic, be pre-populated with data (e.g. from the query string) or simply to only show a limited number of fields.

I use SharePoint Designer to create these as it a a great tool to manipulate the XSLT required. However, by default, Designer will use the list GUID to connect to the list. This poses a problem - when we transfer this webpart to another server (staging / live etc) the GUID will be different.

However, with a small amount of editing of the source, we can make the webpart work on other servers.

The changes required are...

a) In the DataSources string, replace
ParameterKey="ListID" DefaultValue="{YOUR_GUID}" Name="ListID"
with
ParameterKey="ListName" DefaultValue="YOUR_LIST_NAME" Name="ListName".
Note you must do this for each action e.g. UpdateParameters, DeleteParameters

b) In the ParameterBing string replace
ParameterBing Name="ListID" Location="None" DefaultValue="{YOUR_GUID}"
with
ParameterBing Name="ListName" Location="None" DefaultValue="{YOUR_LIST_NAME}"

c) In the main xslt, change
<xsl:param name="ListID">{YOUR GUID}</xsl:param>
to
<xsl:param name="ListName">YOUR_LIST_NAME</xsl:param>

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

WSS 2.0 SP 3 & DataView Woes

I still have some clients running WSS 2. As good IT guys, the IT team patched their WSS 2 farm with Service Pack 3.

Concurrently, I was putting together some dataview web parts to render some web services. Everything worked great on the development virtual server, but try as I might, I could not get the webparts to render for nayone other than administrators on the live servers.

Eventually, we tracked down the problem. SP3 has broken some of the dataview functionality, as noted by SporkBomb. It took a lot of head scratching and crawling the web to find this. (The development machines are were still at SP2 Embarassed )

Microsoft has issued a hotfix to rectify this, but you will have to contact your support centre to obtain the fix. If the blogs are anything to go by, this could be a painful hotfix...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

 

Dilbert of the day