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

Comments

May 21. 2010 18:39

Designer handbags



Hey this is a great post. I'm going to email this to my buddies. I stumbled on this while googling for some lyrics, I'll be sure to come back. thanks for sharing.

Designer handbags

August 7. 2010 01:24

numbers 1-1000

This is very useful to me, please do not delete,<a href="http://www.watchestoo.com/breitling-c-119.html" target="_blank">Breitling</a>, <a href="http://www.watchestoo.com/omega-c-141.html" target="_blank">Omega</a>, <a href="http://www.hublot-replica.com/">hublot replica</a>

numbers 1-1000

August 13. 2010 11:28

Sarina Marsella

Can I make a suggestion? I consider youve obtained anything great right here. But what in case you added a couple links to a page that backs up what youre declaring? Or perhaps you could give us something to appear at, some thing that would connect what youre declaring to something tangible? Just a suggestion.

Sarina Marsella

August 14. 2010 08:06

Victor Leffert

I stumbled upon your website and it is perfect for my situation. It contains excellent and beneficial content. I examined a good number of of them and got a lot from them. To me, you are doing an excellent work. Carry on! I would like to thank you for having such a nice website.

Victor Leffert

August 16. 2010 15:48

Premium Wordpress Themes

You have mention good post above I really enjoy the information. I wish to come again on your site in future…

Premium Wordpress Themes

August 17. 2010 14:42

vigrx

your site layout is very good

vigrx

August 17. 2010 16:00

Hoyt Cowherd

You have fantastic stuff here, Cheers since I find this fairly beneficial. I have actually liked reading through your posts. Simply admirable what you have done here.

Hoyt Cowherd

August 18. 2010 17:41

MilfPorn

What is the captcha code? Please provide me captcha code codes or plugin. Thanks in advance.

MilfPorn

August 19. 2010 04:18

Craig Kaschak

You certain do know what youre talking about. Man, this blog is just excellent! I cant wait to study more of what youve obtained to express. Im actually happy that I came across this when I did due to the fact I had been genuinely starting to get bored while using whole blogging scene. Youve turned me around, man!

Craig Kaschak

August 20. 2010 14:34

Hot Milf

Ver good site! I am loving it!! Will come back again - taking your feeds also. Thanks.

Hot Milf

August 26. 2010 23:16

Delaine Berisha

Great post, bookmarked, will be back later. Because this was a fantastic article, keep up the good work. (There we go, hows that? Two sentences now, can’t call that SPAM.)

Delaine Berisha

August 28. 2010 00:12

Levi Anelli

Extremely useful and informative article. I wish i can do all of that in a short period of time. But for sure doing those will produce results. I will try to spread your words through my blog and link it back to you. Thanks a lot for those tips

Levi Anelli

August 28. 2010 13:48

chat nude

Awesome blog, I'm going to tell all my friends about this! Wow, thanks again.

chat nude

August 29. 2010 07:54

buy iphone

Your Blog is so good I will visit again Thanks

buy iphone

August 30. 2010 22:10

increase semen volume

your site layout is very good

increase semen volume

August 31. 2010 10:08

Nude Cam

Admiring the time and effort you put into your blog and detailed information you offer! I will bookmark your blog and have my children check up here often. Thumbs up!

Nude Cam

September 1. 2010 07:54

Shayne Haydu

great post! i'm bookmarking this!

Shayne Haydu

September 1. 2010 20:49

Sex Cam

This is nice! How did you learn this stuff when you were first getting into it?

Sex Cam

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



 

Dilbert of the day