Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
[ClientCallableAttribute]
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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.