Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I would have thought this would be something I could find easily with a search, but not so far.

I have a parent/child relationship between two lists using a lookup column in the child. I have added a webpart to display a list of child items at the bottom of the parent display form, with filtering provided by configuring a connection between the display form webpart and the list view webpart.

This works well so far, but when adding a child to the list displayed it has to be manually associated with the parent. I would like to pass the lookup value of the parent to the new form of the child. Preferrably, this would be thru the standard add item menus.

What is required to do this?

In the interest of full disclosure, the child list has multiple content types, but I doubt this will cause much of a problem. It's just a matter of adding the content type GUID to the URL of the form.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

I've done this in the past through the use of a custom form web part. You can grab the ID from the query string, load additional attributes if needed, and then write the item(s) to the child web part. Using jQuery and SharePoint's web services makes this very easy.

share|improve this answer
    
JQuery? Yeah, that's on the list of things to learn. Did it with javascript. Thanks. –  David Culp Oct 29 '10 at 15:12
add comment

In SharePoint 2010, use related lists and this script: http://code.google.com/p/sp2010-related-list-prefill/

share|improve this answer
    
Thanks, I'll look into it. –  David Culp Jan 26 '11 at 19:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.