FieldLookup.IsRelationship property
Gets or sets a value that specifies whether this lookup field is returned by GetRelatedField() from the list being looked up to.
Namespace: Microsoft.SharePoint.Client
Assembly: Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)
Syntax
'Declaration
Public Property IsRelationship As Boolean
Get
Set
'Usage
Dim instance As FieldLookup
Dim value As Boolean
value = instance.IsRelationship
instance.IsRelationship = value
public bool IsRelationship { get; set; }
Property value
Type: System.Boolean
Returns Booleantrue if this lookup field is returned by P:Microsoft.SharePoint.Client.List.GetRelatedField from the list being looked up to otherwise returns false. The default value is
Exceptions
Exception | Condition |
---|---|
[System.NotSupportedException] | When the property is read and the list that this field belongs to is an external list. Error code: -1. |
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 RelatedField object with information about the lookup field.
The IsRelationship property returns false if the FieldLookup 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 FieldLookup object for their relationship to the source list.