The "In Focus Verticals" web part in Atlas can be added to a page and linked to an In Focus web part to provide the end user with some additional buttons on the UI that can be clicked to change the type of results being shown, or the filters being applied to those results.
The default verticals All Items and Related Items are available on the majority of Atlas Listing Pages when a workspace is deployed, with the related items filtering based on the tagging of the workspace you are viewing from.
Please note that configuring custom verticals requires some knowledge of Microsoft 365 search and Atlas metadata. If you are unsure how to achieve a specific requirement please get in touch with your support team or CSM.
In this article:
- Add the In Focus Verticals web part to a page
- Add or edit Verticals for your page
- Configure a Vertical to highlight a specific refiner
- Notes for Advanced configuration
- Still need help?
Add the In Focus Verticals web part to a page
The In Focus Verticals web part can be added to any page which includes an In Focus web part. An In Focus Search box web part is not required, but can be provided alongside Verticals so that users can query the results further if needed.
Assuming you already have an In Focus web part on your page returning relevant results, or you want to customise an existing Atlas Listing page with additional verticals, Edit the page and add the In Focus Verticals web part:
Once added you will see some example verticals in the web part, but we can remove those in the next steps and configure our own.
You need to edit your In Focus web part on the page to ensure it is linked to the verticals. Click the "pencil" icon next to your In Focus web part, and on page 2 of the configuration panel, make sure you choose your new verticals web part in the Use verticals from this component field:
You should generally only have one set of verticals for each In Focus web part, but you might have multiple In Focus web parts and verticals to go with each one. In this case you should rename each of your Verticals web parts so it is easy to pick the right one from the dropdown.
Add or edit Verticals for your page
If you are adding this web part to a page for the first time rather than editing an existing set of verticals, you will see the following example verticals Videos, People and Recently changed items:
Starting from this will require more effort than editing an existing Listing Page and will be described in further detail in a later section.
Inspecting the Verticals on a Listing page
In the following steps we will look at the Events Listing page, but please understand that this can be applied to any Listing page to understand how the verticals work. Later we will add a vertical for My Events, which will filter the items based on Atlas User Preferences, but this filtering could be applied to any type of Atlas content. For now though we'll just look at how the Verticals are configured.
The Events Listing page already has an In Focus Verticals web part added so we can start by editing that page, then editing the In Focus Verticals web part. On the Events Listing Page we see All Events and Related Events as the default verticals. Click the "pencil" icon to edit the web part - this will open a configuration panel on the right hand side of the page:
Click the Configure button and a larger panel will appear with the existing verticals in it. In this case for Events the verticals are All Events and Related Events:
Remove an existing Vertical
You can remove an existing vertical using the X on the far right of each line, so if you were starting with the example verticals you can remove them - otherwise it may be more efficient to modify a vertical instead of deleting and recreating.
Configure a Vertical for "My Events"
In this example we will add a third vertical after Related Events called My Events based on Atlas User Preferences. This example has a more complex query template than the previous example but also meets a very different requirement.
Although we will configure this example in the Events Listing page we could actually use the same filter configuration on any type of Atlas content since we will match against the Atlas Global Metadata.
Starting from the Verticals panel show just above, click the Edit button on the grey line at the bottom. Choose the Default language (unless you have requirements for other languages) and type the name for your vertical, so in our case we will type "My Events" then click Add and save:
Next, click the "pencil" icon on the All Events line, and copy the Query Template as a starting point for the one we are adding:
Close the All Events query template, click the "pencil" icon next to the new My Events vertical and paste in the copied template:
The template we copied returns all items that have an Event End Date today or in the future, but does not return when the Event End Date is in the past. Now we want to customise this for our specific requirement to match against the Atlas User Preferences. Regardless of the type of content, you can generally use the following parameters to match the metadata against the user preferences:
CPOverrideUserPrefOWSBOOL:1 OR ({|CPLocationGeographyTaxId:{User.CPGeography}}) OR ({|CPDepartmentsTaxId:{User.CPDepartment}})
This expression has 3 parameters:
- CPOverrideUserPrefOWSBOOL:1 means that any item which is set to Override User Preferences will be shown regardless of matching metadata
- CPLocationGeographyTaxId:{User.CPGeography} means that any item with a Location metadata value that is also present in the user's preferences is shown
- CPDepartmentsTaxId:{User.CPDepartment} means that any item with a Department metadata value that is also present in the user's preferences is shown.
Combined with the query template from All Events, we now have a vertical which returns items matching the following criteria:
- It is an Atlas Event Item,
- The Event has not ended yet,
- The Location or Department matches the current user's Atlas preferences,
- Or if it does not match the preferences, it has been set to override preferences.
Your final query template should therefore look like this:
{searchTerms} CPOverrideUserPrefOWSBOOL:1 OR ({|CPLocationGeographyTaxId:{User.CPGeography}}) OR ({|CPDepartmentsTaxId:{User.CPDepartment}}) AND AtlasRefEventEndDate>{Today-1}
Now we need to set the Result Source Identifier, which is as simple as copying the value used in the existing verticals (or in the In Focus web part the Verticals are linked to):
You should also choose the Icon in the final column by typing the name of the icon from the Office Fabric UI library. If you want to see all possible icons you can refer to this website which shows them all: http://uifabricicons.azurewebsites.net
In this case we are dealing with Events, so we could simply use the Event icon from the UI library by typing "Event" into the Icon field:
Finally, click Save and close the configuration panel on the right. You should now see your new vertical alongside the existing ones:
Make sure you Publish the page to finalise all your changes. If you leave the page in edit mode and your editing session expires you may lose your changes.
If your new vertical does not return the results you expect, or returns no results at all, either you do not yet have any Atlas content matching your filter, or you should verify the Query Template you used.
Configure a Vertical to highlight a specific refiner
In this example we will take a simple refinement filter and "promote" it as a Vertical. This does not provide any additional functionality since users could refine the results themselves, but it makes a particular refiner more obvious to the user. The specific refiner we will configure will show only Policy documents within the Documents Listing.
Start by clicking the Edit button on the grey line at the bottom. Choose the Default language (unless you have requirements for other languages) and type the name for your vertical, so in our case we will type "Policy Documents" then click Add and save:
Now click the "pencil" icon in the new (grey) row to edit the query template:
First type {searchTerms} to ensure that any In Focus Search Box on the page can still be used:
Next, we need to add our additional filter. To find out the Managed Property you'll need, please refer to this article: Atlas Managed Properties for Search
So if we want to refine on the Information Type as we do in this example, we need to match items where RefinableString145 is equal to "Policy". To do this, simply add RefinableString145="Policy" including the quote marks after the {searchTerms}, so it looks like the following:
Click Save at the bottom of the editor. On the previous panel, copy the Result Source Identifier from the All Documents vertical (you can also find this in the linked In Focus web part) and paste it into the same field for the new vertical. If you need to use a different Result Source, you can find them listed here for reference: Result Sources for In Focus web parts
You should also choose the Icon - currently this needs to be done by typing the name of the icon from the Office Fabric UI library. If you want to see all possible icons you can refer to this website: http://uifabricicons.azurewebsites.net, otherwise you could simply copy the icon from one of the existing verticals.
In this case we will use the icon "TextDocument" to differentiate from "Document" used for the existing All Documents vertical.
Finally, click Save to add your new vertical as configured. You will immediately be able to see it on the page, and test that it works:
Make sure you Publish the page to finalise all your changes. If you leave the page in edit mode and your editing session expires you may lose your changes.
If your new vertical does not return the results you expect, or returns no results at all, either you do not yet have any Atlas content matching your filter, or you should verify the Query Template you used and ensure you have the correct Refinable String number and the matching value is spelled correctly.
Notes for Advanced configuration
There are a lot of different scenarios that can be implemented using verticals, so we wanted to give some reference to the different ways that the Query Template can be written to get specific results.
Equals vs. Includes
Query Templates matching against metadata can be configured as equals or includes queries - for example where we used RefinableString145="Policy" in the example above, this means the metadata term must be exactly the term "Policy".
However, you should be aware that instead of an equals (=) you can use a colon (:) which instead of equals means includes, so if you have a number of tags all starting with the word "Policy" you can match against all of them using RefinableString145:"Policy".
Using brackets to apply AND / OR logic
Another thing to note is that you can combine multiple tagging requirements for your filter and use AND / OR logic to create more complex queries. So if we want to include all content with Information Type "Policy" OR "Procedure" in our previous query, we can write something like:
{searchTerms} (RefinableString145="Policy" OR RefinableString145="Procedure")
If instead we want to return only Policies, but only from the Finance department, we could write:
{searchTerms} (RefinableString145="Policy" AND RefinableString133="Finance")
If we want to return content matching Policy OR Procedure AND we only want content from the Finance department, we could write:
{searchTerms} ((RefinableString145="Policy" OR RefinableString145="Procedure") AND RefinableString133="Finance")
Still need help?
If you still need help, please contact your CSM or support team with your requirements.
Comments
0 comments
Please sign in to leave a comment.