Thursday, April 7, 2011

Related Lists in SharePoint 2010

Hi

We will see one of the new concepts from SharePoint 2010 which is related lists. We already have employee list with us. All we need to do is create two more lists. I am creating two lists just to show you an example. We can have as many lists we want.

Create Employee Leave list and go to list settings and create one column which is Empoyee ID and take it as a look up column from Employee list and field Employee ID. One new feature here is when you define lookup column. Now we have the ability to fetch fields from that item and display it in the list as well.




So now when you enter the data in the Employee Leaves and select Employee ID from lookup drop down, you get something like this.



So what happens is, here you would be able to see parent item details as well along with the actual list data.

Now go ahead and create one more list and call it an Employee Projects. Do the same thing, add columns and add EmployeeID column lookup to the Employee list and Employee Field.




Now add some data to this list. So what we have now is three list which are connected from Employee ID look up fields. Empoyee is the main list and then we have two lists with lookup to the Employee list employeeID field.

Open the List settings page of Employee List, create one view and call it a RelatedList view. Open the related list view and click on Site actions -Edit Page.

Go to options tab and then see we have new option called related list.




When you click on related list, it will automatically check all lists that have lookup to Employee List and here we have two lists and hence we will get two options.





Add both these lists and see what you have on the page. Now you have connected three lists and based on the selection of Employee item, you get the other two lists populated accordingly.

You will notice one two sided cross arrow symbol. Clicking on it will show related data in to the lists.

3 comments:

Anonymous said...

Hi, Awesome post, thank you it helped us alot! We recently found a tool that displays related lists in a tabbed format, and allows adding new related items without worrying about setting the lookup fields. It was at www.qipoint.com. Hope that helps someone else.
Roger

Anonymous said...

Hi, Awesome post, thank you it helped us alot! We recently found a tool that displays related lists in a tabbed format, and allows adding new related items without worrying about setting the lookup fields. It was at www.qipoint.com. Hope that helps someone else.
Roger

Tendero said...

Hi, Awesome post, thank you it helped us alot! We recently found a tool that displays related lists in a tabbed format, and allows adding new related items without worrying about setting the lookup fields. It was at www.qipoint.com. Hope that helps someone else.
Roger




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com