TaxonomyField.GetFieldValue(String) TaxonomyField.GetFieldValue(String) TaxonomyField.GetFieldValue(String) Method

Definition

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

public:
 override System::Object ^ GetFieldValue(System::String ^ value);
public override object GetFieldValue (string value);
Public Overrides Function GetFieldValue (value As String) As Object
Parameters
value
String String String

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

Returns

A TaxonomyFieldValue object or a TaxonomyFieldValueCollection object that represents the value parameter.

Remarks

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 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.

Applies to