Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
IsRelationship property

SPFieldLookup.IsRelationship property

Gets or sets a Boolean value that indicates whether the lookup field is discoverable from the list to which it looks for its value.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public bool IsRelationship { get; set; }

Property value

Type: System.Boolean
true if the field is discoverable from the list to which it looks for its value; otherwise, false.

A lookup field is discoverable from the list to which it looks for its value when the source list's GetRelatedFields() method returns a collection that contains an SPRelatedField object with information about the lookup field.

The IsRelationship property returns false if the SPFieldLookup object represents a secondary column in a multiple column lookup. Secondary columns are not discoverable from the source list.

If the IsRelationship property returns true, you can call the GetDependentLookupInternalNames() method to get the internal names of any lookup fields that depend on the current SPFieldLookup object for their relationship to the source list.

Show:
© 2015 Microsoft