Compartilhar via


TaxonomyFieldValue Constructor (String, SPField)

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)

Syntax

'Declaration
Public Sub New ( _
    value As String, _
    creatingField As SPField _
)
'Usage
Dim value As String
Dim creatingField As SPField

Dim instance As New TaxonomyFieldValue(value, creatingField)
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

Remarks

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.

See Also

Reference

TaxonomyFieldValue Class

TaxonomyFieldValue Members

TaxonomyFieldValue Overload

Microsoft.SharePoint.Taxonomy Namespace

TaxonomyField

Microsoft.SharePoint.Taxonomy

Microsoft.SharePoint