none
How to add filter to not show users on people results page of SharePoint online...

    Question

  • Hi,

    We want to add below filters on People Search result page. 

    1. Do not show users whose email starts with ".external".

    2. We have custom Employee ID user profile properties. And We do not want to display users whose Employee ID is blank

    Please suggest how can we add filters to exclude users who match above criteria?

    Regards,

    Amit

    Thursday, April 20, 2017 1:39 PM

All replies

  • Hi Amit,

    We can use Keyword Query Language queries to filter search results.

    1. Edit the People search results page, edit the Search Results web part.

    2. Change the query.

    3. The managed property of user’s work email is “WorkEmail”. Use the following property filter to exclude users whose email starts with ".external"


    4. To exclude users whose "Employee ID" field is empty, we could add the following text to query text. Chang “<Employee ID>” to the manage property of “Employee ID” field.

    AND (<Employee ID>:a* OR <Employee ID>:b* OR <Employee ID>:c* OR <Employee ID>:d* OR <Employee ID>:e* OR <Employee ID>:f* OR <Employee ID>:g* OR <Employee ID>:h* OR <Employee ID>:i* OR <Employee ID>:j* OR <Employee ID>:k* OR <Employee ID>:l* OR <Employee ID>:m* OR <Employee ID>:n* OR <Employee ID>:o* OR <Employee ID>:p* OR <Employee ID>:q* OR <Employee ID>:r* OR <Employee ID>:s* OR <Employee ID>:t* OR <Employee ID>:u* OR <Employee ID>:v* OR <Employee ID>:w* OR <Employee ID>:x* OR <Employee ID>:y* OR <Employee ID>:z* OR <Employee ID>:1* OR <Employee ID>:2* OR <Employee ID>:3* OR <Employee ID>:4* OR <Employee ID>:5* OR <Employee ID>:6* OR <Employee ID>:7* OR <Employee ID>:8* OR <Employee ID>:9* OR <Employee ID>:0*)

    Read the following blog for more information:

    https://www.itunity.com/article/filter-empty-values-search-693

    Best regards,

    Linda Zhang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, April 21, 2017 7:47 AM