Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
SDK Documentation
SPFieldLookup Class
 LookupList Property

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
SPFieldLookup.LookupList Property (Microsoft.SharePoint)
Gets the GUID of the list to use for the lookup.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Visual Basic (Declaration)
Public Property LookupList As String
Visual Basic (Usage)
Dim instance As SPFieldLookup
Dim value As String

value = instance.LookupList

instance.LookupList = value
C#
public string LookupList { get; set; }

Property Value

A GUID that identifies the foreign list.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Question...      gabba_the_hutt   |   Edit   |   Show History
This property appears to be a string is there a reason why it's not of type guid?
Tags What's this?: Add a tag
Flag as ContentBug
Property is read only      Jim Duncan - ShareSquared Inc   |   Edit   |   Show History
This property cannot be set even though the above seems to indicate that it can.
Property can be set      Jarle Nygård   |   Edit   |   Show History
If you set the property with a Guid.ToString() it works. Like this:

SPFieldLookup lookUpField = (SPFieldLookup)list.Fields.GetField(fieldName);
lookUpField.LookupField = lookupFieldInternalName;
lookUpField.LookupList = lookUpSourceList.ID.ToString();
lookUpField.Update();
Tags What's this?: code (x) Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker