TaxonomyField.SetFieldValueByValueCollection method
Sets the value of the corresponding multi-valued field in the list item to the value of the specified TaxonomyFieldValueCollection object.
Namespace: Microsoft.SharePoint.Client.Taxonomy
Assembly: Microsoft.SharePoint.Client.Taxonomy (in Microsoft.SharePoint.Client.Taxonomy.dll)
Syntax
'Declaration
Public Sub SetFieldValueByValueCollection ( _
item As ListItem, _
taxValueCollection As TaxonomyFieldValueCollection _
)
'Usage
Dim instance As TaxonomyField
Dim item As ListItem
Dim taxValueCollection As TaxonomyFieldValueCollection
instance.SetFieldValueByValueCollection(item, _
taxValueCollection)
public void SetFieldValueByValueCollection(
ListItem item,
TaxonomyFieldValueCollection taxValueCollection
)
Parameters
item
Type: Microsoft.SharePoint.Client.ListItemThe SPListItem object whose field is to be updated.
taxValueCollection
Type: Microsoft.SharePoint.Client.Taxonomy.TaxonomyFieldValueCollectionThe TaxonomyFieldValueCollection object whose value is to be used to update this field.
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
Microsoft.SharePoint.Client.Taxonomy namespace
GetFieldValue