TaxonomyField.SetFieldValueByTermCollection method

Sets the value of the corresponding multi-value field in the list item to the properties of the Term objects in the specified collection, in the specified language.

Namespace:  Microsoft.SharePoint.Client.Taxonomy
Assembly:  Microsoft.SharePoint.Client.Taxonomy (in Microsoft.SharePoint.Client.Taxonomy.dll)


Public Sub SetFieldValueByTermCollection ( _
    item As ListItem, _
    terms As TermCollection, _
    lcid As Integer _
Dim instance As TaxonomyField
Dim item As ListItem
Dim terms As TermCollection
Dim lcid As Integer

instance.SetFieldValueByTermCollection(item, _
    terms, lcid)
public void SetFieldValueByTermCollection(
    ListItem item,
    TermCollection terms,
    int lcid


  • lcid
    Type: System.Int32

    The language code identifier (LCID) of the language of the default Label objects to use.


Exception Condition

One or more arguments to this method are a null reference (Nothing in Visual Basic), or the TaxonomyField object does not allow multiple values.


Each Term has a maximum of one default Label for every language in the TermStore object. For each Term, The default Label in the default language of the TermStore is used.

The field will be assigned a TaxonomyFieldValueCollection object.

See also


TaxonomyField class

TaxonomyField members

Microsoft.SharePoint.Client.Taxonomy namespace