TaxonomyFieldValue.PopulateFromLabelGuidPair Method
SharePoint 2010
Updates the value of the TaxonomyFieldValue object with the specified text data.
Assembly: Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)
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.