Share via


TaxonomyFieldControl.GetTaxonomyCollection method

Converts a string to a TaxonomyFieldValueCollection object,

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

Syntax

'Declaration
Public Shared Function GetTaxonomyCollection ( _
    text As String _
) As TaxonomyFieldValueCollection
'Usage
Dim text As String
Dim returnValue As TaxonomyFieldValueCollection

returnValue = TaxonomyFieldControl.GetTaxonomyCollection(text)
public static TaxonomyFieldValueCollection GetTaxonomyCollection(
    string text
)

Parameters

  • text
    Type: System.String

    String to be converted into a TaxonomyFieldValueCollection object.

Return value

Type: Microsoft.SharePoint.Taxonomy.TaxonomyFieldValueCollection
A TaxonomyFieldValue object that is created from the string text

Remarks

The string that is passed in must be formatted with a label and its GUID must be delimited with a | character. You can repeat the format more than one time and delimit it with a ; character,

This method can also be used with a full GUID path. For example, if you have the Term object named X with the GUID 12345678-1234-1234-1234-123456789012, and you have the parent Term named Y at the root of the TermSet object with the GUID 87654321-4321-4321-4321-210987654321, you can use either of the following values: X|12345678-1234-1234-1234-123456789012, or X|87654321-4321-4321-4321-210987654321|123456789-1234-1234-1234-123456789012.

See also

Reference

TaxonomyFieldControl class

TaxonomyFieldControl members

Microsoft.SharePoint.Taxonomy namespace