DotNetCurry Logo

SharePoint - Creating a Lookup column in a Custom List

Posted by: Ravi Keshwani , on 9/18/2010, in Category SharePoint
Views: 53301
Abstract: In this article, I will show you how we can add a lookup column in a custom list which will populate its column values from an existing list, associated with it.
This is my first article for DotNetCurry.com and I am very happy to start a SharePoint Beginner Series here. In this article, I will show you how we can add a lookup column in a custom list which will populate its column values from an existing list, associated with it.
Let us assume that a custom list named ‘Team’ already exists. We want to create a new list ‘Members’ which will belong to one of the team, from our custom list ‘Team’ as shown below:
image_3
Follow the steps shown below to Create a “Members List “and add a look up column.
Step 1: Goto Site Actions > Site Settings > Site Administration > Site Libraries and List > Create New Content > Custom Lists > Provide name ‘Members’ and click create.
Step 2: You will now see ‘Members’ List in the quick launch list (to the left). To add a Look up column, Click Settings > Create Column as shown below:
image_1
Step 3: Clicking this option will display a screen where you can add a custom column. Provide a column name in ‘Column Name’ text field and then select Lookup radio button from the columns list. Provide some basic information such as Description and required field settings.
Step 4: There is a dropdown field tagged ‘Get Information From’ as shown in the screenshot below. Select the List named ‘Teams’ from it and a column name ‘Title’ from the dropdown field ‘In this Column’ and click OK.
image_2
Again select the ‘Members’ List and click new. Now the form will have a lookup field named ‘Team’ with a dropdown showing the teams.
That’s it! It was easy stuff right. Stay tuned for some more cool SharePoint tips in my upcoming articles….
Was this article worth reading? Share it with fellow developers too. Thanks!
Share on LinkedIn
Share on Google+
Further Reading - Articles You May Like!


Page copy protected against web site content infringement 	by Copyscape




Feedback - Leave us some adulation, criticism and everything in between!
Comment posted by Jyoti L on Monday, September 20, 2010 3:15 AM
thanks for tip. will this work in sharepoint 2003/2007/2010?
Comment posted by Rahul Ponnala on Monday, September 27, 2010 5:06 PM
@ Jyoti L
Yes. This will work on all versions of SharePoint - 2003, 2007, 2010.
There is a lot to know when you actually consume this lookup column in a WebPart though.
The lookup column is 2007, acts as a Combo Box if there are > 20 items from the 'Get Information From' list. It will be a drop down if the items from the 'Get Information From' list are less than 20.
A point to note is that this feature is OOTB and works in the above mentioned way in IE, whereas it will be a drop down list in Firefox though.
You can make this consistent using some JQuery or a simple and very effective way is to use a Site Column and have it consumed in your List.

Hope this helps!!

Rahul
www.sharepointquest.com
Comment posted by snreddy on Monday, February 14, 2011 11:07 AM
SharePoint - Creating a Lookup column in a Custom List ur articel very nice and good Nice post. The way you written is appreciated

http://sharepointsolution2010.blogspot.com/2011/02/show-additional-columns-from-lookup.html
Comment posted by Ravi Keshwani on Monday, January 16, 2012 4:31 AM
thanks to all for your appreciation
Comment posted by Richard Boisvert on Tuesday, March 4, 2014 7:04 PM
Wow, very great article for newbiews with this step by step approach

Keep on the good work !
My best,