Share via


TaxonomyField.SetFieldValue method (SPListItem, TaxonomyFieldValueCollection)

Sets the value of the corresponding multi-valued field in the list item to the value of the specified TaxonomyFieldValueCollection object.

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

Syntax

'Declaration
Public Sub SetFieldValue ( _
    item As SPListItem, _
    taxValueCollection As TaxonomyFieldValueCollection _
)
'Usage
Dim instance As TaxonomyField
Dim item As SPListItem
Dim taxValueCollection As TaxonomyFieldValueCollection

instance.SetFieldValue(item, taxValueCollection)
public void SetFieldValue(
    SPListItem item,
    TaxonomyFieldValueCollection taxValueCollection
)

Parameters

Exceptions

Exception Condition
ArgumentException

One or more of the arguments to this method are a null reference (Nothing in Visual Basic).

NotSupportedException

The field is not multi-valued.

See also

Reference

TaxonomyField class

TaxonomyField members

SetFieldValue overload

Microsoft.SharePoint.Taxonomy namespace

GetFieldValue

TaxonomyFieldValueCollection

Microsoft.SharePoint.Taxonomy

Microsoft.SharePoint