TermStore.GetTermsWithCustomProperty Method

Definition

Overloads

GetTermsWithCustomProperty(String, Boolean)

This method retrieves a collection of all Term objects, from all TermSets in this TermStore that the current user has permissions to read, that have a custom property with the provided property name.

GetTermsWithCustomProperty(String, Int32, Boolean)

This method retrieves a collection of all Term objects, from all TermSets in this TermStore that the current user has permissions to read, that have a custom property with the provided property name.

GetTermsWithCustomProperty(String, String, Boolean)

Gets a collection of all Term objects, from all TermSet objects in this TermStore object that the current user has permissions to read, that have a custom property with the specified property name and the specified property value.

GetTermsWithCustomProperty(String, String, StringMatchOption, Boolean)

Gets a collection of all Term objects, from all TermSet objects in this TermStore that the current user has permissions to read, that have a custom property starting with or matching the provided property name and the provided property value.

GetTermsWithCustomProperty(String, String, StringMatchOption, Int32, Boolean)

Gets a collection of all of the Term objects, from all T:Microsoft.SharePoint.TaxonomyTermSets in this TermStore that the current user has permissions to read, that have a custom property starting with or matching the provided property name and the provided property value.

GetTermsWithCustomProperty(String, Boolean)

This method retrieves a collection of all Term objects, from all TermSets in this TermStore that the current user has permissions to read, that have a custom property with the provided property name.

public:
 Microsoft::SharePoint::Taxonomy::TermCollection ^ GetTermsWithCustomProperty(System::String ^ customPropertyName, bool trimUnavailable);
public Microsoft.SharePoint.Taxonomy.TermCollection GetTermsWithCustomProperty (string customPropertyName, bool trimUnavailable);
member this.GetTermsWithCustomProperty : string * bool -> Microsoft.SharePoint.Taxonomy.TermCollection
Public Function GetTermsWithCustomProperty (customPropertyName As String, trimUnavailable As Boolean) As TermCollection

Parameters

customPropertyName
String

The custom property name

trimUnavailable
Boolean

A boolean indicating whether to trim out terms that have Term.IsAvailableForTagging set to false.

Returns

TermCollection

A collection of all Term objects, from all TermSets in this TermStore that the current user has permissions to read, that have a custom property with the provided property name.

Exceptions

The customPropertyName cannot be null or empty.

The value of customPropertyName is invalid. It probably contains invalid characters or is too long.

Remarks

If trimUnavailable is true then terms that have Term.IsAvailableForTagging set to false will be trimmed from the results; otherwise all matching terms will be returned regardless of their Term.IsAvailableForTagging value. The customPropertyName cannot be null or empty, and must not exceed 255 characters in length. It also cannot contain any of the following illegal characters ; " < > | & tab The search is case-insensitive. A maximum of 100 results will be returned from this search. To get the most accurate results it is recommended that any pending changes be committed to the database using CommitAll() prior to executing this search.

Applies to

GetTermsWithCustomProperty(String, Int32, Boolean)

This method retrieves a collection of all Term objects, from all TermSets in this TermStore that the current user has permissions to read, that have a custom property with the provided property name.

public:
 Microsoft::SharePoint::Taxonomy::TermCollection ^ GetTermsWithCustomProperty(System::String ^ customPropertyName, int resultCollectionSize, bool trimUnavailable);
[Microsoft.SharePoint.Client.ClientCallable(ClientLibraryTargets=Microsoft.SharePoint.Client.ClientLibraryTargets.NonRESTful)]
public Microsoft.SharePoint.Taxonomy.TermCollection GetTermsWithCustomProperty (string customPropertyName, int resultCollectionSize, bool trimUnavailable);
member this.GetTermsWithCustomProperty : string * int * bool -> Microsoft.SharePoint.Taxonomy.TermCollection
Public Function GetTermsWithCustomProperty (customPropertyName As String, resultCollectionSize As Integer, trimUnavailable As Boolean) As TermCollection

Parameters

customPropertyName
String

The custom property name

resultCollectionSize
Int32

Indicates the maximum number of Term objects to include in the returned TermCollection.

trimUnavailable
Boolean

A boolean indicating whether to trim out terms that have Term.IsAvailableForTagging set to false.

Returns

TermCollection

A collection of all Term objects, from all TermSets in this TermStore that the current user has permissions to read, that have a custom property with the provided property name.

Attributes
ClientCallableAttribute

Exceptions

The customPropertyName cannot be null or empty.

The value of customPropertyName is invalid. It probably contains invalid characters or is too long.

The resultCollectionSize value is invalid. It must be greater than 0.

Remarks

If trimUnavailable is true then terms that have Term.IsAvailableForTagging set to false will be trimmed from the results; otherwise all matching terms will be returned regardless of their Term.IsAvailableForTagging value. The customPropertyName cannot be null or empty, and must not exceed 255 characters in length. It also cannot contain any of the following illegal characters ; " < > | & tab The resultCollectionSize value must be greater than 0. The search is case-insensitive. The maximum number of results returned from this search is restricted by the resultCollectionSize parameter. To get the most accurate results it is recommended that any pending changes be committed to the database using CommitAll() prior to executing this search.

Applies to

GetTermsWithCustomProperty(String, String, Boolean)

Gets a collection of all Term objects, from all TermSet objects in this TermStore object that the current user has permissions to read, that have a custom property with the specified property name and the specified property value.

public:
 Microsoft::SharePoint::Taxonomy::TermCollection ^ GetTermsWithCustomProperty(System::String ^ customPropertyName, System::String ^ customPropertyValue, bool trimUnavailable);
[Microsoft.SharePoint.Client.ClientCallable(ClientLibraryTargets=Microsoft.SharePoint.Client.ClientLibraryTargets.NonRESTful)]
public Microsoft.SharePoint.Taxonomy.TermCollection GetTermsWithCustomProperty (string customPropertyName, string customPropertyValue, bool trimUnavailable);
member this.GetTermsWithCustomProperty : string * string * bool -> Microsoft.SharePoint.Taxonomy.TermCollection
Public Function GetTermsWithCustomProperty (customPropertyName As String, customPropertyValue As String, trimUnavailable As Boolean) As TermCollection

Parameters

customPropertyName
String

The custom property name

customPropertyValue
String

The custom property value

trimUnavailable
Boolean

A Boolean indicating whether to trim out terms that have Term.IsAvailableForTagging set to false.

Returns

TermCollection

A collection of all Term objects, from all TermSet objects in this TermStore that the current user has permissions to read, that have a custom property with the provided property name and the provided property value

Attributes
ClientCallableAttribute

Exceptions

The customPropertyValue cannot be null or empty.

The value of customPropertyValue is invalid. It contains invalid character '\t', '\n', or both.

Remarks

If trimUnavailable is true then terms that have Term.IsAvailableForTagging set to false will be trimmedfrom the results; otherwise all matching terms will be returned regardless of their Term.IsAvailableForTagging value. The customPropertyName cannot be a null reference (Nothing in Visual Basic) or empty, and must not exceed 255 characters in length.It also cannot contain any of the following illegal characters ;"<>|&tab The customPropertyValue cannot be null or empty, and must not exceed 255 characters in length. It also cannot contain any of the illegal characters \t or \n. The search is case-insensitive. A maximum of 100 results will be returned from this search. To get the most accurate results it is recommended that any pending changes be committed to the database using CommitAll() before executing this search.

Applies to

GetTermsWithCustomProperty(String, String, StringMatchOption, Boolean)

Gets a collection of all Term objects, from all TermSet objects in this TermStore that the current user has permissions to read, that have a custom property starting with or matching the provided property name and the provided property value.

public:
 Microsoft::SharePoint::Taxonomy::TermCollection ^ GetTermsWithCustomProperty(System::String ^ customPropertyName, System::String ^ customPropertyValue, Microsoft::SharePoint::Taxonomy::StringMatchOption stringMatchOption, bool trimUnavailable);
[Microsoft.SharePoint.Client.ClientCallable(ClientLibraryTargets=Microsoft.SharePoint.Client.ClientLibraryTargets.NonRESTful)]
public Microsoft.SharePoint.Taxonomy.TermCollection GetTermsWithCustomProperty (string customPropertyName, string customPropertyValue, Microsoft.SharePoint.Taxonomy.StringMatchOption stringMatchOption, bool trimUnavailable);
member this.GetTermsWithCustomProperty : string * string * Microsoft.SharePoint.Taxonomy.StringMatchOption * bool -> Microsoft.SharePoint.Taxonomy.TermCollection

Parameters

customPropertyName
String

The custom property name

customPropertyValue
String

The custom property value

stringMatchOption
StringMatchOption

Indicates whether to search for custom property names and values that start with the specified strings, or search for those that exactly match the specified strings.

trimUnavailable
Boolean

A Boolean indicating whether to trim out terms that have Term.IsAvailableForTagging set to false.

Returns

TermCollection

A collection of all Term objects, from all TermSets in this TermStore that the current user has permissions to read, that have a custom property starting with or matching the provided property name and the provided property value.

Attributes
ClientCallableAttribute

Exceptions

The customPropertyValue cannot be null or empty.

The value of customPropertyValue is invalid. It contains invalid character '\t', '\n'. or both.

Remarks

If trimUnavailable is true then terms that have Term.IsAvailableForTagging set to false will be trimmed from the results; otherwise all matching terms will be returned regardless of their Term.IsAvailableForTagging value.

The customPropertyName cannot be a null reference (Nothing in Visual Basic) or empty, and must not exceed 255 characters in length. It also cannot contain any of the following illegal characters ;"<>|&tab

The customPropertyValue cannot be a null reference (Nothing in Visual Basic) or empty, and must not exceed 255 characters in length. It also cannot contain any of the illegal characters \t or \n.

The search is case-insensitive. A maximum of 100 results will be returned from this search. To get the most accurate results it is recommended that any pending changes be committed to the database using CommitAll() before executing this search.

Applies to

GetTermsWithCustomProperty(String, String, StringMatchOption, Int32, Boolean)

Gets a collection of all of the Term objects, from all T:Microsoft.SharePoint.TaxonomyTermSets in this TermStore that the current user has permissions to read, that have a custom property starting with or matching the provided property name and the provided property value.

public:
 Microsoft::SharePoint::Taxonomy::TermCollection ^ GetTermsWithCustomProperty(System::String ^ customPropertyName, System::String ^ customPropertyValue, Microsoft::SharePoint::Taxonomy::StringMatchOption stringMatchOption, int resultCollectionSize, bool trimUnavailable);
[Microsoft.SharePoint.Client.ClientCallable(ClientLibraryTargets=Microsoft.SharePoint.Client.ClientLibraryTargets.NonRESTful)]
public Microsoft.SharePoint.Taxonomy.TermCollection GetTermsWithCustomProperty (string customPropertyName, string customPropertyValue, Microsoft.SharePoint.Taxonomy.StringMatchOption stringMatchOption, int resultCollectionSize, bool trimUnavailable);
member this.GetTermsWithCustomProperty : string * string * Microsoft.SharePoint.Taxonomy.StringMatchOption * int * bool -> Microsoft.SharePoint.Taxonomy.TermCollection

Parameters

customPropertyName
String

The custom property name

customPropertyValue
String

The custom property value

stringMatchOption
StringMatchOption

Indicates whether to search for custom property names and values that start with the specified strings, or search for those that exactly match the specified strings.

resultCollectionSize
Int32

Indicates the maximum number of Term objects to include in the returned TermCollection object.

trimUnavailable
Boolean

A Boolean indicating whether to trim out terms that have Term.IsAvailableForTagging set to false.

Returns

TermCollection

A collection of all Term objects, from all TermSet objects in this TermStore that the current user has permissions to read, that have a custom property starting with or matching the specified property name, and the specified property value.

Attributes
ClientCallableAttribute

Exceptions

The customPropertyValue cannot be a null reference (Nothing in Visual Basic) or empty.

The value of customPropertyValue is invalid. It contains invalid character '\t', '\n', or both.

The resultCollectionSize is invalid. It must be greater than 0.

Remarks

If trimUnavailable is set to true then terms that have Term.IsAvailableForTagging set to false will be trimmed from the results; otherwise all matching terms will be returned regardless of their Term.IsAvailableForTagging value. The customPropertyName cannot be null or empty, and must not exceed 255 characters in length. It also cannot contain any of the following illegal characters ;"<>|&tab The customPropertyValue cannot be a null reference (Nothing in Visual Basic) or empty, and must not exceed 255 characters in length.It also cannot contain the illegal characters \t or \n. The resultCollectionSize value must be greater than 0. The search is case-insensitive. The maximum number of results returned from this search is restricted by the resultCollectionSize parameter. To get the most accurate results it is recommended that any pending changes be committed to the database using CommitAll() before executing this search.

Applies to