Compartilhar via


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

Syntax

'Declaration
<ClientCallableAttribute> _
Public Property IsRelationship As Boolean
    Get
    Set
'Usage
Dim instance As SPFieldLookup
Dim value As Boolean

value = instance.IsRelationship

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

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