Atlas supports adding your own custom properties to the SharePoint User Profiles to support custom scenarios. In this article we explain how to have them indexed by Microsoft Search, and use the indexed data to add them as custom refiners to In Focus web parts.
To learn how to set up and sync a custom Profile Property (which is needed to follow the steps here) please see: <LINK TO SYNC ARTICLE>
Please carefully read the following caveats before continuing:
- Due to the way Microsoft Search works, you may need to do this over more than one day to allow the search schema to generate the necessary "Managed Property" data.
- To set up the Search configuration you'll need to be a SharePoint Administrator.
In this article:
- Populate the custom Profile Property
- Configure the Search schema to make the property usable as a filter
- Use your property as a Filter in Atlas Search
Populate the custom Profile Property
Once you have added the new Profile Property you need to populate it with a value for at least one user so that the Search service will crawl it and generate us a Crawled Property.
Since we're talking about User Profiles you have two options:
- Manually edit one User Profile and populate the property with a value.
- Set up a sync for the custom property and wait for the sync to run so the property has a value.
Now you'll need to wait a little while for the Microsoft Search to generate the Crawled Property.
Configure the Search schema to make the property usable as a filter
Usually after less than 15 minutes the item you created will be crawled by the Search service and a Crawled Property will be generated. Sometimes this can take longer but unfortunately there is no way to monitor or control it - you simply have to be patient - I usually recommend coming back after an hour.
The final step is to tell the Search service to link our Crawled Property to a Managed Property which can then be used as a filter (refiner) in Search.
This step requires a user with SharePoint Administrator permissions to manage the Search schema. If you are not a SharePoint Administrator you will need to seek the help of one in your organisation to complete this step.
- As a SharePoint Administrator, go to the SharePoint Admin centre via the Microsoft 365 Admin centre
- On the left hand rail click More features, then under Search click Open:
- On the next page click the first option Manage Search Schema:
- From here you can start to configure a suitable Managed Property. To find one, type "refinable" in the search box and press enter to search:
- For a Text column we want a RefinableString property (this is the most likely choice for a Profile Property)
- For a Date column we want a RefinableDate property
- For Number columns there are a few options; RefinableDouble, RefinableInt and RefinableDecimal
- For this example we will assume that the column is a Text column which will need to use one of the RefinableString properties. The important thing is to use a property which is not already being used by Atlas. If you look at the list of properties you can see that some already have the Mapped Crawled Properties already populated:
There will be many (tens or hundreds depending on type) that are not populated. - We recommend choosing a specific range of numbers for your own custom properties that are not too close to the Atlas properties, for example RefinableString100 to RefinableString109 are not used by Atlas. Once you have chosen an unmapped property, click the name of it in the left hand column to start mapping it to your column.
- Once you have chosen a Managed Property which is not currently in use, click on the name of the property in the left-hand column to change its configuration. Scroll all the way to bottom of the configuration page and you'll see the Mappings to crawled properties section:
- Next, click the Add a Mapping button. You'll see the screen get greyed out immediately, but you'll need to scroll back up or wait a few seconds to see the panel that loads at the top of the page. In the panel, type the name you gave to your custom property into the search box, click Find, and wait 10 seconds or so to see the results.
Note: You can find all the Profile Properties by selecting the catgeory "People" then clicking Find. Or if you added a prefix to your property you can simply search for the prefix. - You should see a crawled property with the name you gave to your Profile Property. Select it by clicking on it, then click OK at the bottom of the panel. You'll now see your Crawled Property listed in the Managed Property configuration:
- Scroll down and click OK to save this configuration.
After completing these steps Microsoft Search will take some time to generate the data in the Managed Property, so it is usually best to leave it overnight. Unfortunately in SharePoint Online it is not possible to manage the schedule for this job and it usually takes several hours to propagate.
Use your property as a Filter in Atlas Search
Once a SharePoint Administrator has set up the Managed Property as explained in the previous section, anyone with Edit permissions in a workspace can apply it as a filter in the People Directory (Atlas) web part or any In Focus web part configured to return User Profiles.
Create a one-off filter for a single web part
- Edit your page, then edit the People In Focus web part you want to filter by clicking the "pencil" icon to the left of the web part
- A panel will appear on the right of the page which has all the configuration options. At the bottom of the panel, use the paging control to go to Page 2
- On page 2 of the panel, at the top you will see the Query template box. In this box you can use the Managed Property and a specific value to filter the items returned. Add a space after the existing query and then add your property filter e.g.:
- The filter above will ensure the web part only returns items with a value of "Property Value" in the profile property. Of course in your case you should use the specific Managed Property you configured and match to the exact value you need in that column.
- To see the new set of results, click out of the Refinement Filters field and you should see the web part load the new results set. You may need to save the page as a draft to force the update.
- Once you are happy with the results returned, make sure you publish your page to save your changes.
Add your filter to an In Focus Filters web part
First you should configure a People Directory (Atlas) web part and People Directory Filters (Atlas) web part on the same page and ensure they are configured to work together so that the Filters are populated.
- To add your custom column as a filter, Edit the In Focus Filters web part and at the top of the first panel click the Edit refiners button:
- Under the existing options you'll find a grey line at the bottom of the table:
- First, click into the dropdown box on the left (note that it may take a few seconds to load the content) then scroll down to the RefinableString properties and select the specific one you configured for your column. If you do not see it in the list it may not have been indexed yet, but you can type it into the box manually.
- Next click the Edit button in the same line to add the filter label in the languages you need to support. Another panel will open - first choose "Default" from the drop down and set the default label (for any language not otherwise specified):
- If you need to add translations click the + on the right hand side, then in the new row configure the next language, and so on. Once all required labels are configured click Add and save to confirm.
- Back on the Edit refiners panel choose the Refiner Template best suited to your property. Default and Multi-value are the most likely choices:
- Default refinement item - choose one filter only
- Multi-value refinement item - choose multiple filters at once
- Date range / Date range (fixed intervals) - for date fields
- Persona - not supported for profiles
- File type - not supported for profiles
- Multiple file type - not supported for profiles
- Container tree - not supported at all
- Boolean refinement item - yes/no filter
- Next, choose the method to determine sort order for the values shown for the filter. You can use Alphabetical order or by Number of results.
- In the final dropdown whether that should use Ascending or Descending sort order.
- Usually, you will want to show your custom property as one of the first filter options, so use the numbered dropdowns on the far left to change the order, for example select 1 for the new column so it appears first.
- Finally click Save at the bottom of the panel, then Save or Publish the page to ensure you don't lose your work.
Comments
0 comments
Please sign in to leave a comment.