다음을 통해 공유


TaxonomyField.SetFieldValue Method (SPListItem, ICollection<Term>, Int32)

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.Taxonomy
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)

Syntax

'Declaration
Public Sub SetFieldValue ( _
    item As SPListItem, _
    terms As ICollection(Of Term), _
    lcid As Integer _
)
'Usage
Dim instance As TaxonomyField
Dim item As SPListItem
Dim terms As ICollection(Of Term)
Dim lcid As Integer

instance.SetFieldValue(item, terms, lcid)
public void SetFieldValue(
    SPListItem item,
    ICollection<Term> terms,
    int lcid
)

Parameters

  • lcid
    Type: System.Int32

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

Exceptions

Exception Condition
ArgumentException

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

Remarks

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 object is used.

The field will be assigned aTaxonomyFieldValueCollection object.

See Also

Reference

TaxonomyField Class

TaxonomyField Members

SetFieldValue Overload

Microsoft.SharePoint.Taxonomy Namespace

GetFieldValue(String)

AllowMultipleValues

TaxonomyFieldValue

Term

Microsoft.SharePoint.Taxonomy

Microsoft.SharePoint