SP.FieldCollection.addDependentLookup Method (sp.js)
Adds a secondary lookup field that depends on a primary lookup field for its relationship to the list where it gets its information.
Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013
SP.FieldCollection.addDependentLookup()
Return value
Type: SP.Field
The new secondary lookup field.
Remarks
In a multicolumn lookup, the primary field is the SP.FieldLookup object that establishes the relationship with the list that is the source of the lookup field's value. One or more secondary fields can then depend on the primary field for their relationship to the source list.
REST resource endpoint
See FieldCollection resource for more information.
Endpoint URI structure
http://<sitecollection>/<site>/_api/web/lists(listid)/fields/addDependentLookupField(displayName,primaryLookupFieldId,showField)
HTTP requests
This resource supports the following HTTP commands:
- POST
POST syntax
POST http://<sitecollection>/<site>/_api/web/lists(listid)/fields/addDependentLookupField(displayName,primaryLookupFieldId,showField)
Resource parameters
displayName
primaryLookupFieldId
showField
Parameters
displayName
primaryLookupField
lookupField