Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TaxonomyField.GetFieldValue method

Converts the specified string value into a TaxonomyFieldValue or a TaxonomyFieldValueCollection object.

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

public override Object GetFieldValue(
	string value
)

Parameters

value
Type: System.String

A formatted string containing identifier, label, and path information to convert into a TaxonomyFieldValue or a TaxonomyFieldValueCollection object.

Return value

Type: System.Object
A TaxonomyFieldValue object or a TaxonomyFieldValueCollection object that represents the value parameter.

The value parameter string must be formatted as a series of one or more string tokens separated by the Delimiter delimiter. Each token consists of an internal identifier, a label, and a path:[ID;#LABEL|PATH].[ID] is the internal identifier of the list item.[LABEL] is the default Label of the corresponding Term in the TermStore.[PATH] is a string of GUIDs delimited by a pipe (|) character and Terminating in the GUID that identifies the Term: [ROOT_TERM_GUID|...|PARENT_TERM_GUID|TERM_GUID].

For example, [id;#label|path] represents a single value. The string [id1;#label1|path1;#id2;#label2|path2;#id3;#label3|path3] represents three taxonomyfield values that can be parsed into a TaxonomyFieldValueCollection object.

The delimiters in the value string representation are defined by the following properties:[;#] is returned by the Delimiter property, and [|] is returned by the TaxonomyGuidLabelDelimiter property.

The AllowMultipleValues property deTermines whether the TaxonomyField object allows multiple values. If the TaxonomyField object does not allow multiple values, a TaxonomyFieldValue object is returned. Otherwise a TaxonomyFieldValueCollectionobject is returned even if the value parameter represents a single value.

Show:
© 2015 Microsoft