SP.Taxonomy.TaxonomyField object (sp.taxonomy)

Represents a taxonomy field.

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

var object = new SP.Taxonomy.TaxonomyField()

Members

The TaxonomyField object has the following members.

Constructor

The TaxonomyField object has the following constructor.

Constructor

Description

TaxonomyField

Initializes a new instance of a SP.Taxonomy.TaxonomyField object (sp.taxonomy) object.

Methods

The TaxonomyField object has the following methods.

Method

Description

getFieldValueAsHtml

Returns the field value in HTML format in order to render the field value directly on a page.

getFieldValueAsTaxonomyFieldValue

Converts the specified string value into a TaxonomyFieldValue object.

getFieldValueAsTaxonomyFieldValueCollection

Converts the specified string value into a TaxonomyFieldValueCollection object.

getFieldValueAsText

Returns a plain text representation of the field value.

getValidatedString

Validates the field value object using logic specific to the TaxonomyField object, and returns a serialized string representation of the validated field value object.

setFieldValueByCollection

Sets the value of the corresponding multi-value field in the list item to the properties of the Term objects in the specified collection, in the specified language.

setFieldValueByTerm

Sets the value of the corresponding field in the list item to the properties of the specified Term in the specified language.

setFieldValueByTermCollection

Sets the value of the corresponding multi-value field in the list item to the properties of the Term objects in the specified collection, in the specified language.

setFieldValueByValue

Sets the value of the corresponding field in the list item to the value of the specified TaxonomyFieldValue object.

setFieldValueByValueCollection

Sets the value of the corresponding multi-valued field in the list item to the value of the specified TaxonomyFieldValueCollection object.

Properties

The TaxonomyField object has the following properties.

Property

Description

anchorId

Gets or sets the GUID of the anchor Term object for a TaxonomyField object.

createValuesInEditForm

Gets or sets a Boolean value that specifies whether the new Term objects can be added to the TermSet while typing in the TaxonomyField editor control.

isAnchorValid

Gets a Boolean value that specifies whether the Term object identified by the anchorId property is valid.

isKeyword

Gets or sets a Boolean value that indicates whether the TaxonomyField value points to the Enterprise Keywords TermSet object.

isPathRendered

Gets or sets a Boolean value that specifies whether the default Label objects of all the parent Term objects of a Term in the TaxonomyField object will be rendered in addition to the default label of that Term.

isTermSetValid

Gets a Boolean value that specifies whether the TermSet object identified by TaxonomyField.termSetId property exists and is available for tagging.

open

Gets or sets a Boolean value that specifies whether the new Term objects can be added to the TermSet while typing in the TaxonomyField editor control.

sspId

Gets or sets the GUID that identifies the TermStore object, which contains the Enterprise Keywords for the site that the current TaxonomyField belongs to.

targetTemplate

Gets or sets the Web-relative URL of the target page that is used to construct the hyperlink on each Term object when the TaxonomyField object is rendered.

termSetId

Gets or sets the GUID of the TermSet object that contains the Term objects used by the current TaxonomyField object.

textField

Gets or sets the GUID that identifies the hidden text field in an item.

userCreated

Gets or sets a Boolean value that specifies whether the TaxonomyField object is linked to a customized TermSet object.