SP.ViewFieldCollection.add Method (sp.js)
Adds the field with the specified field internal name or display name to the collection.
Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013
SP.ViewFieldCollection.add()
Parameters
strField
Type: StringSpecifies the field internal name or the display name.
Return value
Undefined
Remarks
It must not be null.
REST resource endpoint
See ViewFieldCollection resource for more information.
Endpoint URI structure
http://<sitecollection>/<site>/_api/web/lists(listid)/Views(viewid)/ViewFields/addViewField(strField)
HTTP requests
This resource supports the following HTTP commands:
- POST
POST syntax
POST http://<sitecollection>/<site>/_api/web/lists(listid)/Views(viewid)/ViewFields/add(strField)
Resource parameters
- strField