Forum Discussion
Sharepoint List - Parent/Child relationship in single list?
Hi, I'm new to Sharepoint and am using Lists. I have a Lotus Notes background and know I am using some wrong terminology so please bear with me. I know how to use a lookup field to another list but my question is this, is it possible to have both parent and child 'documents' in the same list and, if so, can I display the list like this:
>Parent
Child
Child
>Parent
Child
Child
5 Replies
asapboston Are you trying to add lookup column from same SharePoint list (as lookup parent list & child list)? If yes, it is possible in SharePoint to create lookup column based on same list.
Check this documentation: Create list relationships by using lookup columns
Also check my responses on this thread: SharePoint list self join?
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs
- asapbostonCopper ContributorThank you for your reply Ganesh! This isn't what I'm trying to do here but your suggestion is going to help me with another process I'm working on so thank you very much!!
- RobElliottSilver Contributor
asapboston SharePoint lists are not a full relational database, but you can achieve what you want by grouping list items. In this example we've got the names of people attending a course. Initially it's just the All Items view.
From the dropdown in the top right of the list a new view called Group By Course has been created. Then edit the view again from the dropdown in the top right. In the screen that appears scroll down to the Group By section and group by the appropriate column which in this case is Title as it holds the name of the course. Set the group to be collapsed or expanded by default. I've also set the Totals to be displayed.
Select the view and the courses will be grouped with the numbe rof people attending each course. Clicking on the > will expand the group.
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)- asapbostonCopper ContributorThank you very much for your reply Rob. Unfortunately, using grouping doesn't give me the functionality I'm looking for. I'm pretty sure it can't be done in lists because, as you said, they aren't relational. (Man, do I miss Lotus Notes.)
- BrianLabelleSumAppDevCopper Contributor
asapboston Funny that you write Lotus Notes, PCLP Notes Dev here... stumbled on your post as I am trying to accomplish similar. How I miss Lotus Notes and the swiss army knife apps I could build in hours.