Creating a SharePoint List Parent/Child Relationship – VIDEO REMIX
Guest Author: Mark Rackley
The SharePoint Hillbilly
Everybody dance now!
Everyone loves a good remix… So… By far my most popular blog post is my entry Creating a SharePoint List Parent / Child Relationship – Out of the Box. I am thrilled that so many have found it useful. However, several questions have popped up from the blog and I’ve learned more since then and wanted to redo the blog. So, what better way than to do it with videos! I broke the entire blog up into 6 different videos for your viewing pleasure. Sorry if I ramble.. but hopefully I get my thoughts across and it makes sense.
If you find any portion confusing let me know and I’ll try and redo it!!! Without further ado… Creating a SharePoint List Parent/Child Relationship – Video Remix….
*Lights fade*
*Hush of the audience in anticipation*
Okay.. okay.. I’ll just get to it.
Video 1 – Creating the Site and Lists
Video 2 – Setting Up Filtered Child List on Parent Display Form
Video 3 – Creating Custom New Page form for New Child Entry
I also start the processing of inserting a link to the new page
Video 4 – Passing the Value of the Parent List ID to the Child New Item Entry Page
Video 5 – Automatically Setting Parent ID field in Child List from Query String Variable
I also hide the Parent ID field on the Child New Item form to prevent users from mucking it up
Video 6 – Creating Links to Child Entry Display Pages From Child List on Parent Display Form
Guest Author: Mark Rackley
Mark has been developing software applications for over 15 years filling the roles of Project Manager, Business Analyst, Lead Developer, and Software Architect. He has been involved in projects for such companies as Dell, Motorola, Intel and Agilent Technologies. Mark’s goal is to help ever new architect and developer avoid the frustrations and brick walls he ran into while learning SharePoint.
Blog: http://www.sharepointhillbilly.com
Email: [email protected]
Twitter: http://www.twitter.com/mrackley
- SharePoint Date Filter: Filtering a List by Greater Than or Equal to Date
- Creating a SharePoint List Parent / Child Relationship - Out of the Box
- Passing Multiple Query String Variables Using SPD – Follow Up on Creating Parent / Child List Relationships
- Setting SharePoint Form Fields Using JavaScript
- Tips When Asking For SharePoint Help
- Setting SharePoint Form Fields Using Query String Variables Without Using JavaScript
- Creating a SharePoint List Parent/Child Relationship – VIDEO REMIX
- SharePoint: Populating Drop Down List Field with Data from Different Site
- Building The Right SharePoint Team For Your Organization
This is really useful!
I’m a SharePoint novice… Is there an easy out-of-the-box way to strip HTML from displayed columns? E.g. when I display a “person or group” field (which for all I know is a custom column type at my company) looked up from another list, I see the following (assuming the HTML renders as I typed it…):
Doe, John
What I want it to show is just the user’s name, “John Doe” – ideally with a link to content information… but I’ll settle for just the name instead of showing all the gory HTML in the column on the page.
Very useful!
I had a problem with a column in the DataView that used HTML – it was a link to contact information in the original “Time” list. Instead of showing the person’s name with a link to the contact information, the DataView showed the HTML on the web page in all its unseemly, user-unfriendly gory detail.
To make it render the name as it should have been, I added “disable-output-escaping” to the XSL for that column. I.e. In the code view for the page, I changed the tag that displayed that field from
xsl:value-of select=”@Column_x0020_Title”
to
xsl:value-of disable-output-escaping=”yes” select=”@Column_x0020_Title”
then it displayed with the HTML rendered just like it appeared on the original list’s Display view.
I’m not yet sure what kinds of evil things this might do if the person’s name (which we look up from ActiveDirectory during original data entry) happens to have XML or HTML tags in it…
Thanks for the great article. I was wondering if you could post the code that you copied out of the notepad file for the insert as it is hard to see what the syntax is.
Enjoyed to article
What happens if you delete a parent? Won’t it orphan the children?
Follow-up article cascading deletes
Hi,
The videos don’t seem to be appearing? Would love to see them. Thanks!
Christine – VIdeos are definitely working, coming from YouTube. Check with IT to make sure they aren’t being blocked. — Mark
HI Mark,
Wish you Happy New Year and thanks for Sharing Knowledge.
I was following your post to achieve parent child relationship between Course and Register Employee for Course.
I am Passing ID for Course and Name to child Register.I have Dropdown lists for ID and Course Name.I am setting Dropdown Default to value passed in Querystring which works fine.
But when i hit Ok Button i am getting error
Invalid data has been used to update the list item. The field you are trying to update may be read only.
Its Erroring Out only in case Course Name its works fine with ID Dropdown.
Please guide me on this
Thanks
Great post!
Here is the alternative way:
http://www.codeproject.com/KB/sharepoint/ParentChildren.aspx
HI Mark,
Thanks for your Support for Previous Issue.
I did follow your step but when Users click on Register link they are getting permission denied error.
All users have read access to Parent list,Child list and also pages library in which i have store register form.
any suggestion on this ?
Thanks
Ron
HI Mark,
I have one question does Edit and Delete Work in Time log List i mean in DVWP which display time for issue add Delete and Update functionality see if it works.Its not working in My case.
Ron
Thanks for the great article. Any suggestions to cascade delete are welcome.
For those who don’t want to look up the syntax in Marks other article:
Create a new Time Log Entry…
It seems to be case sensitive, else the insert item link won’t redirect to the Parent (Issue) list after saving the new Child item (Time Log), but to the Child (Time) list.
Hello Sir
This is great Post. is it possible to achieve this functionality (Show Child data on parent View Form) using Code ? using SharePoint 2010 Foundation.
This is a great article and everything was going fine until I got to the insert part of the NewForm. I’m trying to use a document library as my child list. I have an Issues parent list where users need to upload photos related to an issue. I don’t want to use attachments because it is difficult to access the attached files independently. Is there any way to accomplish this with a document library?
I’m trying to do the same thing Karen – did you have any succes in this?
This is great, many thanks for putting this together!
One question though, will this site backup & restore ok?
I created a backup of my site, but when I restored it the associated “children” aren’t displayed on the “parent” form (the webpart gives a “non-specific” error), and also the “create new child” page which magically inserts the FK won’t display either…. any ideas why?
Mark,
Can you accomplish this same functionality with a List to Document Library relationship? Instead of going from Parent List (Issues) to Child List (Time), you would be going from Parent List (Issues) to Child Library (Documentation for instance).
With a document library their is no new item form, only an upload form, so i can’t figure out how to carry the ID relationship in an automated manner.
This exactly what I’m trying to accomplish as well – to display Related Documents. The issue with this example is that from the start it relies on user selecting a NUMERIC ID parent field from the drop-down. In my case I want them to select the Title of my parent items. So if I have a Project A I want them to select Project A from the drop-down when they upload a document. How would you do this? I have yet to find a working solution for this.
Hi,
In sahrepoint 2010 we have xlstListviewwebpart and we can establish relational between list via -”Insert relatioed list” functionality.
However we still have the problem of defaulting the selected Parent ID in Child list new form.
I am not able to figure out how do I determine the ID field name from aprent list.
u ahd used $parentID in querystring for ur example.
Can you please sugguest for xsltlistviewwebpart?
Thanks
Hi Mark. Thanks for the post ~ a very nice piece of work.
Do you have any ideas (or have you already addressed in another post) how I could prevent a parent (task) from being marked as “completed” or 100% if one or more associated child (tasks) are still “in progress” or less than 100%?
Thanks,
Dave
Great post! BUT I’m having the same problem as Priyanka – SharePoint Designer 2010 is putting an XsltListViewWebPart in, so there doesn’t seem to be a way to pass the parent ID to the form that inserts the child item.
Any help with how to do this with SPD 2010 would be really appreciated! Thanks for the great posts!