Lists Relation in SharePoint 2010

SharePoint 2010 Relational Lists

Using Look up fields in SharePoint 2010, we can force a relationship behavior.

Microsoft have now provided with few new options when working with Look up Fields:

  1. Joins between lists
  2. Projected Fields
  3. Relational integrity

Projected Fields

Projected fields have the capability to pull information from a parent list into the view of the child list.

This actually mean that you can refer and display information from a parent list, in child list. The fields are Read-Only but enables you to get a joined view.

Relational integrity

SharePoint 2010 and relations in lists, you would wonder how it handles the relational integrity.

There are generally two relational integrity options:

  1. Restricted delete
    The restricted delete option enables you to enforce a behavior that means that you can’t delete any items that have relations from the list.
  2. Cascade delete
    Cascade delete means that when you’re trying to delete an item which has relations – it’ll delete the related items as well.

Step by step

1. Create a parent list

  • Create a new List named “ParentList”
  • Create a new Column in that list with the following settings:

  • Add some sample records in the list :

2. Create a child list

  • Create a new List named “ChildList”
  • Create a new Column in that list with the following settings:

Kindly note that I have checked the City check box. This will create a Projected Field against the look up automatically. Now you can view that information which exist in the parent list directly in the child list.

3. Test the projected field functionality

Add some new records in the ChildList to see that when you add an item & choose a company from the ParentList it will automatically show the projected field (“City”) as a read-only field in the child-list:

4. Forcing relational behavior

When you create (or change settings for) a look up field (like the “ParentLink” field), you can change settings for the relational behavior.

Go to “ParentLink” column, or when you create a new look up field – and see the below dialog box:

From this dialog box you can see, you have the ability to make the appropriate settings for your fields.

Restricted Delete

If you select the “Restricted Delete” option, you will see the following behavior when trying to delete an item that has related items:

Cascade Delete

If you choose the “Cascade Delete” option for look up field instead, you will be sending the items to the Recycle Bin . Then it will look like this in the recycle bin:

You have the icon that looks like a relational diagram in your recycle bin  this means that you have deleted an item that may have deleted linked items. If you restore this item it will automatically restore all of the items that were originally deleted.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.