TaxonomyFieldValue.PopulateFromLabelGuidPair Method
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)
Syntax
'Declaration
Public Sub PopulateFromLabelGuidPair ( _
text As String _
)
'Usage
Dim instance As TaxonomyFieldValue
Dim text As String
instance.PopulateFromLabelGuidPair(text)
public void PopulateFromLabelGuidPair(
string text
)
Parameters
text
Type: System.StringA formatted string that contains the label, path GUIDs, and term GUID.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The text parameter is a null reference (Nothing in Visual Basic). |
Remarks
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.