Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TaxonomyField.ValidateAndParseValue method

SharePoint 2013

Parses the field value and returns a validated object.

Namespace:  Microsoft.SharePoint.Taxonomy
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)

public override Object ValidateAndParseValue(
	SPListItem item,
	string value
)

Parameters

item
Type: Microsoft.SharePoint.SPListItem

The item containing the TaxonomyField for which the value is to be updated.

value
Type: System.String

The field value in the same format as the PopulateFromLabelGuidPair(String) method (for single-value fields) or the PopulateFromLabelGuidPairs(String) method (for multi-value fields).

Return value

Type: System.Object
A parsed and validated TaxonomyFieldValue or TaxonomyFieldValueCollection object.

This method is called by the client-side rendering framework when a field value needs to be updated.

A TaxonomyField is unique because it requires its value to be set using TaxonomyField.SetFieldValue method, instead of the more direct way of setting SPListItem["fieldName"]=value. Since the caller has no knowledge of this requirement, this method automatically calls the TaxonomyField.SetFieldValue method. You need to be aware that this method does more than just validate and parse the field value, but only for TaxonomyField objects.

Show:
© 2015 Microsoft