This topic has not yet been rated - Rate this topic

TaxonomyFieldValue Constructor (String, SPField)

SharePoint 2010

Initializes a new instance of the TaxonomyFieldValue object that is bound to the specified SPField object and is based on the specified field value.

Namespace:  Microsoft.SharePoint.Taxonomy
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)
public TaxonomyFieldValue(
	string value,
	SPField creatingField
)

Parameters

value
Type: System.String
A formatted string that contains the internal identifier, label, and path of the field
creatingField
Type: Microsoft.SharePoint.SPField
The TaxonomyField object that the current TaxonomyFieldValue object will bind to

This constructor is used both when a value is retrieved from the database and when a user sets the fields value.

The string passed as the value parameter must be formatted either as: [ID;#LABEL] or [ID;#LABEL|PATH].[ID] is the internal identifier of the field value in the list.[LABEL] is the default label of the Term that is referenced by the TaxonomyField object.[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].

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.

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