SP.FieldCollection.add Method (sp.js)

Adds a field to the field collection.

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

SP.FieldCollection.add()

Parameters

  • field
    Type: SP.Field

    The field to add to the collection.

Return value

Type: SP.Field

The field added to the collection.

REST resource endpoint

See FieldCollection resource for more information.

Endpoint URI structure

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

HTTP requests

This resource supports the following HTTP commands:

  • POST

POST syntax

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

Resource parameters

  • parameters