TaxonomyField.SetFieldValueByTermCollection 方法
設定清單項目中指定的集合,以指定的語言Term物件的屬性中的相對應的多重值欄位的值。
命名空間: Microsoft.SharePoint.Client.Taxonomy
組件: Microsoft.SharePoint.Client.Taxonomy.Silverlight (在 Microsoft.SharePoint.Client.Taxonomy.Silverlight.dll 中); Microsoft.SharePoint.Client.Taxonomy.Phone (在 Microsoft.SharePoint.Client.Taxonomy.Phone.dll 中) Microsoft.SharePoint.Client.Taxonomy (在 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
)
參數
item
類型:Microsoft.SharePoint.Client.ListItemSPListItem物件的欄位會更新。
terms
類型:Microsoft.SharePoint.Client.Taxonomy.TermCollectionTerm物件其屬性是用來更新的欄位值的集合。
lcid
類型:System.Int32語言的程式碼識別項 (lcid) 碼来使用的預設Label物件的語言。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentException | 這個方法的一或多個引數都是null 參考 (未執行任何動作 於 Visual Basic 中),或TaxonomyField物件不允許多重值。 |
備註
每個TermTermStore物件中有一個預設Label每一種語言的最大值。對於每個Term中,使用預設LabelTermStore預設語言。
功能變數會被指派TaxonomyFieldValueCollection物件。