Follow

Webpart - Search

Article last updated on 3rd of October 2019.

1. Introduction

WorkPoint’s Search webpart can be used in Modern UI WorkPoint solutions. Quick information gathering is important, as it frees up resources for other important tasks. This webpart makes it possible to search across the entire solution, or it can be limited to specific areas of the solution. This helps users quickly find whatever information they need from anywhere on the solution.

A great thing about this webpart is that it is highly customizable. The webpart can be set up to show the columns that you want, and those columns data for the items searched for will show up in the search results.

Other important aspects of the customizability of the webpart is explained in the Configuration section of this article.

2. Requirements

Utilizing this feature requires a specific feature license. Please contact WorkPoint sales at sales@workpoint.dk for more information about purchasing a license for this feature.

3. Configuration

In order to set up a Search webpart, follow these steps:

  1. Click the “Add a new web part”-button to add a new webpart.
  2. Choose the “WP365 – Search” webpart from the list of available webparts.

When the search webpart is added, the configuration panel is also opened:

  1. A title can be added for the webpart. This title is shown as the first element of the webpart on the solution, just above the search bar. If there is no text in the Title field, the field will be hidden on the solution.
  2. A scope can be chosen for the webpart. The webpart searches for results within the given scope:
    • Everywhere: Searches across the entire tenant.
    • Entire WorkPoint solution: Searches across the entire WorkPoint solution.
    • Entity site: Searches through the current entity site
    • Entity site and below: Searches through the current entity site, as well as elements below in the hierarchy.
  3. A base query can be defined in this field. The base query determines what the default search when loading the webpart should be. An asterisk (*) in this field will make the system fetch all results and display them when loading the webpart. For more information about the query language used in Search, visit https://docs.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference
  4. The Web Part size field lets the user choose how big the webpart should be. A smaller size will display less results upfront, while a larger size requires more space on the solution.
  5. The user can control the number of results for the system to fetch. The slider increments and decrements by 5 and goes from a minimum of 10 to a maximum of 500.
  6. Compact view: Compact view compresses the space between search results to make the webpart more compact.
  7. Show search bar: Lets the user decide whether to show the search bar.
  8. Load more results on scroll: Lets the user have the system load more results as they approach the end of the list of results.
  9. The "Sorting Field" field allows the user to select by which managed property search results should be sorted.
  10. The "Direction" field lets you choose in which direction results should be ordered. Options are "A to Z" or "Z to A".
  11. The user can specify which columns to show in the webpart results. The title field is standard but can be edited. More columns can be added by clicking the “Add mapping”-button (17).
  12. The first field of a new column is the displayed name in the webpart. This can be typed in by the user.
  13. The second field is the managed property. This field determines which data for the system to show in the column. An example could be “LastModifiedTime” which fetches the date when the result items were last modified.
  14. The last field lets the user choose how they want the column to be displayed. Following the example above, “LastModifiedTime” could be represented as text, so “Text” would be chosen from the drop-down menu.

The user can choose to have properties show in the following ways:

  • Text: The property is shown as a simple text.
  • Site: The property is displayed as a SharePoint site-icon.
  • Link: The property is displayed as a link. Be advised that if the property is not actually a link, the property link will not work, but it will still be displayed as a link.
  • TitleLink; TitleLink is the primary column (Used for title, name, or the most important property).
  • DocIcon: the property is shown as an icon representing the type of resulting document.
  1. The “Add mapping”-button lets the user add a new column to the search webpart.
  2. The “Apply”-button saves eventual changes that has not yet been applied.

Once the webpart has been configured, the page can be published/republished.  

4. End User Guide

Once the webpart has been set up properly, users can use the webpart to search through the specified scope. The Search bar takes inputs from the user and presents search results in the section below the search bar.

An example of the usage of the Search webpart is shown in the image below:

In this example, a search query of “Transmittal” has been given. The system searches through the scope and returns whichever items contains the text “Transmittal”. The columns have been set up to show a range of different data, such as Last modified date and document ID.

It is worth noting that more than one search query can be provided at a time. Multiple search queries should be separated by a colon (,). You can e.g. input “Transmittal, [USERNAME]” in order to search for results containing both “Transmittal”, and some user name.

The webpart can be set up to show tasks assigned to the current user using the search query "AssignedToOWSUSER:{me}".

Another example where no search query is given in the search can be seen in this image:

In this example, a base search query of "filetype:docx" was used for base search query in the web part settings.

It is important to note that search is only performed with regards to the columns set up in the webpart. If e.g. the "Author" column is not set up for the webpart, search results containing the search query in the "Author" column is  are not returned.

In effect, this means that the user cannot search for results based on columns not present on the webpart.

At this time, WorkPoint does not support sorting by clicking a column header. Sorting and filtering must be done through search queries. Please visit https://docs.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference for more information about search queries and the search query language.

5. Notes

A list of managed properties can be found by following these steps:

  1. On the site where the Search webpart is to be added, click the cog-icon in the top right corner of the page.
  2. Choose “Site information”.
  1. Choose “View all site settings”.
  1. From the Site Settings page, choose “Schema” under the Search chapter.

Following the steps above takes the user to the Site Collection Administration – Managed Properties page. Here available managed properties are listed and can be searched through if the user is looking for information about a specific property.

This page is exemplified in the image below:

Often times, one would want the file icon to be displayed in the search results section of the webpart. This can be done by creating the following configuration in the columns-section when editing the webpart:

To insert a link to the parent site of the result, create the following configuration in the columns-section when editing the webpart:

Have more questions? Submit a request