This topic has not yet been rated - Rate this topic

TaxonomyFieldValue.PopulateFromLabelGuidPair Method

SharePoint 2010

Updates the value of the TaxonomyFieldValue object with the specified text data.

Namespace:  Microsoft.SharePoint.Taxonomy
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)
public void PopulateFromLabelGuidPair(
	string text
)

Parameters

text
Type: System.String
A formatted string that contains the label, path GUIDs, and term GUID.
Exception Condition
ArgumentException

The text parameter is null.

The text parameter must be formatted as follows:[LABEL|PATH].[LABEL] is the default Label object of the Term object that is referenced by the TaxonomyField object.[PATH] consists of 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].

[|] represents the separator string returned by the TaxonomyGuidLabelDelimiter property.

This method does not validate the textparameter. If a string with invalid format is provided, the value of the TaxonomyFieldValue object is reset and no exception is raised.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ