Using the Search Taxonomy Control in search panels

When defining custom MacroView search masks you can utilise a number of out-of-the box controls, including text boxes, date/time, drop down and Yes / No.

By using an optional Search Taxonomy Control you can also add TaxonomyPicker controls that allow you to select valid values from a managed metadata term set.  The TaxonomyPicker control allows you to pick multiple values by typing ahead and / or by searching across the taxonomy. The selected (picked) values are then used in the search query that MacroView DMF generates to find documents and emails stored in SharePoint – either on-premises or Online. The term set can be hierarchical, as in the following screen shot, where the top level of Region is continent.

 

Defining a TaxonomyPicker control

The <control> entry for a taxonomy control in your search mask requires of 3, 4 or 5 parameters depending on:

  1. where the term set has been defined
  2. where the search managed property corresponding to the term set had been defined
  3. whether the search should return results that match ALL or ANY of the selected values. 

The general syntax for defining the TaxonomyPicker control is:

<Control Name="nmanagedpropertyname|termstoreid|termsetid[[|termsetlocation]|matchtype]" 

for example:

To display the Document Type managed metadata term set located at the tenancy level.

<Control Name="DocumenType|5abe6173b7384ced9ac40905921d3b94|f9222dba-de9f-429c-bd4f-18161f938f5f" Type="TaxonomyPicker" DisplayName="Document Type" />

To display the Document Type managed metadata term set located at the site collection level.

<Control Name="DocumenType|5abe6173b7384ced9ac40905921d3b94|f9222dba-de9f-429c-bd4f-18161f938f5f|https://yourtenancy.sharepoint.com/sites/sitename" Type="TaxonomyPicker" DisplayName="DocumentType" />

To display the Document Type manage metadata term set located at the site collection level where only documents matching ALL of the selected values are to be returned.

<Control Name="DocumenType|5abe6173b7384ced9ac40905921d3b94|f9222dba-de9f-429c-bd4f-18161f938f5f|https://yourtenancy.sharepoint.com/sites/sitename|AND" Type="TaxonomyPicker" DisplayName="DocumentType" />

To display the Document Type manage metadata term set located at the site collection level where documents matching ANY of the selected values are to be returned.

<Control Name="DocumenType|5abe6173b7384ced9ac40905921d3b94|f9222dba-de9f-429c-bd4f-18161f938f5f|https://yourtenancy.sharepoint.com/sites/sitename|OR" Type="TaxonomyPicker" DisplayName="DocumentType" />

To display the Document Type manage metadata term set located at the tenancy level where only documents matching ALL of the selected values are to be returned.

<Control Name="DocumenType|5abe6173b7384ced9ac40905921d3b94|f9222dba-de9f-429c-bd4f-18161f938f5f|tenancy|AND" Type="TaxonomyPicker" DisplayName="DocumentType" />

Note: The default match type for a multi value term set is OR meaning search results will be returned for documents that have ANY of the selected values unless the AND parameter is inlcuded.  

tip.png Tip: Contact services@macroview.com.au to purchase a license for this optional control.

 

Related articles

Have more questions? Submit a request

0 Comments

Article is closed for comments.