SharePoint 2010 Referential integrity - Using LookUp Column

There are two major enhancements in Lookup Columns for SharePoint 2010.

1. You can now display additional columns from the look-up list, along with the look up field data.

for e.g. If your Look-up List has Columns City, Zipcode and State, and if you select "City" to be displayed as Look-up column in your list, you would also have an option to display other information like Zipcode and State along with the City column in your view. You cannot however treat City and State as look-up columns, they are just additional information to the City you selected.


2. Implementing Referential integrity

When you create a Lookup column in SharePoint 2010, you would see an option (at the bottom) to define a Relationship. You are given two choices

1. Restrict Delete
2. Cascade Delete


Restrict Delete :
Choosing this option would restrict the users from deleting an item in the column in the Look-up list, if the value is being used in some other lists. This means that if a value in the City column is used in our list, then it cannot be deleted from the look-up list.

Cascade Delete :
If an Item\value in the City column in the look-up list is deleted, then all those items referencing that value (as look-up value) in other lists will also be deleted.

So, by using the Restrict delete option we can now achieve true Referential integrity within our list data. Cooll

2 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. This is one of the best articles so far I have read online. No crap, just useful information. Very well presented. Its really helpful for beginner as well as developer. Thanks for sharing with us. Check out this link too its also having a wonderful explanation on referential integrity in sharepoint...

    http://mindstick.com/Articles/866d97d3-7b96-4e38-a38b-fc4ed183af3f/?Referential%20Integrity%20in%20SharePoint%202010

    It is also help me lot.
    Thanks everyone!!

    ReplyDelete

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer or anyone else. Should you have any questions or concerns please e-mail me at sharepointprogrammingblogger@gmail.com .

Copyright (c) 2010 @ myshaepointwork.blogspot.com. All rights are reserved.Do Not Copy.

@ Learning SharePoint.com