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)
Syntax

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.
See Also

Tags :


Community Content

gabba_the_hutt
Question...
This property appears to be a string is there a reason why it's not of type guid?
Tags :

Jim Duncan - ShareSquared Inc
Property is read only
This property cannot be set even though the above seems to indicate that it can.
Tags : contentbug

Jarle Nygård
Property can be set
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 : code

Page view tracker