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 the Enterprise Keyword or Search Taxonomy Controls you can also add controls that allow you to select valid values from a managed metadata term set. The Search Taxonomy Controls allow 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.
There are two type of Search Taxonomy Controls available:
- TaxonomySearch - available in DMF and Message 8.5 or later.
- EnterpriseKeyword - available in DMF and Message 8.7.41 or later.
TaxonomySearch and EnerpriseKeyword search control
Defining a TaxonomySearch control
The Name entry in the <control> section of the taxonomy control in your search mask requires 3, 4 or 5 parameters depending on:
- where the term set has been defined
- where the search managed property corresponding to the term set had been defined
- whether the search should return results that match ALL or ANY of the selected values.
The general syntax for defining the Taxonomy control is:
<Control Name="managedpropertyname|termstoreid|termsetid[|termsetlocation]|matchtype] Type="control type" DisplayName="control label" />
e.g.
<Control Name="DocumentType|5abe6173b7384ced9ac40905921d3b94|f9222dba-de9f-429c-bd4f-18161f938f5f" Type="TaxonomySearch" DisplayName="Document Type" />
for example:
To display the Document Type managed metadata term set located at the tenancy level.
<Control Name="DocumentType|5abe6173b7384ced9ac40905921d3b94|f9222dba-de9f-429c-bd4f-18161f938f5f" Type="TaxonomySearch" DisplayName="Document Type" />
To display the Document Type managed metadata term set located at the site collection level.
<Control Name="DocumentType|5abe6173b7384ced9ac40905921d3b94|f9222dba-de9f-429c-bd4f-18161f938f5f|https://yourtenancy.sharepoint.com/sites/sitename" Type="TaxonomySearch" 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="DocumentType|5abe6173b7384ced9ac40905921d3b94|f9222dba-de9f-429c-bd4f-18161f938f5f|https://yourtenancy.sharepoint.com/sites/sitename|AND" Type="TaxonomySearch" 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="DocumentType|5abe6173b7384ced9ac40905921d3b94|f9222dba-de9f-429c-bd4f-18161f938f5f|https://yourtenancy.sharepoint.com/sites/sitename|OR" Type="TaxonomySearch" 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="DocumentType|5abe6173b7384ced9ac40905921d3b94|f9222dba-de9f-429c-bd4f-18161f938f5f|tenancy|AND" Type="TaxonomySearch" 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 included.
Defining a Enterprise Keyword control
The syntax for defining the EnterpriseKeyword control is:
<Control Name="managedpropertyname|termstoreid|termsetid|matchtype] Type="control type" DisplayName="control label" />
e.g.
<Control Name="owstaxIdTaxKeyword|5abe6173b7384ced9ac40905921d3b94|f9222dba-de9f-429c-bd4f-18161f938f5f" Type="EnterpriseKeyword" DisplayName="Keyword" />
Matchtype is optional and defaults to OR meaning search results will be returned for documents that have ANY of the selected values unless the tenancy|AND parameter is included. e.g.
<Control Name="owstaxIdTaxKeyword|5abe6173b7384ced9ac40905921d3b94|f9222dba-de9f-429c-bd4f-18161f938f5f|tenancy|AND" Type="EnterpriseKeyword" DisplayName="Keyword" />
The TaxonomySearch control above replaces the previously available TaxonomyPicker control type that can be purchased separately. If you have existing search panels containing TaxonomyPicker controls these will still work and can be can be update to TaxonomySearch controls simply by changing the control Type.
Optional TaxonomyPicker control
Tip: Contact services@macroview.com.au to purchase a license for the optional Taxonomy Picker control if required.
Related articles
Comments
0 comments
Article is closed for comments.