Thursday, March 17, 2011

"Insert Related List" feature in SharePoint 2010


 One of the helpful features in SharePoint 2010 is the "Related List" button.


Figure(1)

This button is used to add lists which are related to a specific list (one-to-many relationship) in the same page and filter the data according to the selected item in the primary list.
Example: In this example I’ll present a demo for Customers and Customer Orders, and how to relate the data and display it in one page.
1- Create the following two lists:
    • Customers:
    Figure(2) Customers List
    • Customer Orders:
    Figure(3)  Customer Orders
    Where the Customer field is a lookup from Customers list.

    2- Enter some data to both lists.
      3- Browse to a SharePoint page and add Customers List web part to it.


      Figure(4)
      4- In the Page Edit Mode; Activate the Customers web part by Selecting it.

      Figure(5)
      5- Clicking on “Insert Related List” shows all the lists which are related to the Customers list.
      6- Select Customer Orders.
      7- Now you will see that a new column “Select” has been added to the Customers web part and when the user clicks on it, it filters the list of orders by the selected customer.

      Figure(6)

      I hope this was useful for you.
      If you have any comments don't hesitate to post it.