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)

Syntax

'Declaration
Public Property IsRelationship As Boolean
    Get
    Set
'Usage
Dim instance As SPFieldLookup
Dim value As Boolean

value = instance.IsRelationship

instance.IsRelationship = value
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.

Remarks

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.

See also

Reference

SPFieldLookup class

SPFieldLookup members

Microsoft.SharePoint namespace

IsDependentLookup

GetDependentLookupInternalNames()

GetRelatedFields()

SPRelatedField