SPField.EnforceUniqueValues Property
SharePoint 2010
Gets or sets a Boolean value that specifies whether to enforce uniqueness in column values. The default is false.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
[ClientCallableAttribute] [ClientCallableConstraintAttribute(FixedId = "1", Type = ClientCallableConstraintType.Custom, Value = "The value can not be set to FALSE for the built-in fields or for the site columns")] public bool EnforceUniqueValues { get; set; }
Property Value
Type: System.BooleanReturns true to enforce uniqueness in values that populate a specified column; otherwise false. The default is false.
| Exception | Condition |
|---|---|
| SPException | You cannot set this property to true for a built-in field or for a site column. |