Share via


SP.Field.enforceUniqueValues property (sp.js)

Gets or sets a value that specifies whether to require unique field values in a list or library column.

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

var value = SP.Field.get_enforceUniqueValues ()
var value = SP.Field.set_enforceUniqueValues ()

Return value

Type: Boolean

true to require unique field values in a list or library column; otherwise, false.

Remarks

This property cannot be set to false for built-in fields or the site columns.

REST resource endpoint

See Field resource for more information.

Endpoint URI structure

http://<sitecollection>/<site>/_api/web/lists(listid)/fields(fieldid)/enforceUniqueValues

HTTP requests

This resource supports the following HTTP commands:

  • POST

POST syntax

POST http://<sitecollection>/<site>/_api/web/lists(listid)/fields(fieldid)/enforceUniqueValues

GET syntax

GET http://<sitecollection>/<site>/_api/web/lists(listid)/fields(fieldid)/enforceUniqueValues