I have the main department as "Finance" and under that there are several sub departments like "Finance and Accounts","Economics",etc.,The SharePoint users are allocated with their specific department in user profiles.

I also have a "Finance" page in SharePoint site.In that page I need to display the profile details of SharePoint users whose department matches the Finance and its sub departments.

To achieve this ,I have used search Webpart in the Finance page. I have planned to use a list named "Finance" containing the names of sub departments.Now I need to lookup the values of "Finance" list in the search query of the Webpart. Can anyone say how can I query the values of list in search query box? Can anyone give me suggestions on this? Is there any other better approaches?


2 Answers 2


The answer to your question would be Managed property.

For your particular question, Department field itself is a term set field already available to be queried. If you have maintained, the correct hierarchy in your department structure, you can query the parent term and all child terms easily using search.

Given the following taxonomy

World (fc01ae6d-8ed3-4872-9cef-d2199d52d61c)
           India (c8a43f13-5ea1-45f2-b46d-3a1986a1cbd7)
            Mumbai (ad491ed9-c21c-46d9-896c-c0d148957c60)
            Delhi (c195b6e0-9062-446a-9af1-8ec1a642fede)
      France (17587ed2-8433-45a4-9f4b-6825164fcd09)
            Paris (01031cfe-2492-47f1-8723-45c63ef70ec9)
            Lyon (3b2137a9-3c3a-4676-a50a-14f72ab29175)

All restaurants in Mumbai




All restaurants in the World


All restaurants in India


All restaurants in India, including India itself

owstaxIdLocation:"GPP|#c8a43f13-5ea1-45f2-b46d-3a1986a1cbd7" AND owstaxIdLocation:"GP0|#c8a43f13-5ea1-45f2-b46d-3a1986a1cbd7"

Credit to the excellent article here by Mikael Svenson @MikaelSvenson (scroll down to Query for Managed metadata section)


1- start with search in codeplex. (so i searching for you and find this wsp and installed that.

result is if you install it and help from one drop-down custom field or click on those field (like this article) in your list setting and add anothers related field.

lookup field configuration in SharePoint 2013

  • Ajax Enabled
  • Easy ToolPart configuration of list
  • Automatically populates List in site collection in Drop Down List
  • Configure Filter Fields
  • Configure Display Fields on Grid
  • Search Query operator Selection

2- My friend Customize that project and use in his projects . you also can customize with c# if you want.

  • I am trying to query the values from the column iterative manner in search webpart and not adding lookup column to list.@yazdi
    – NivethaSri
    Commented Dec 20, 2016 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.