0

I'm working a search result page with default search webparts searching against SharePoint Local People as data source.

In every search result item, it populates employee's manager as an hyperlink which leads to another standard search result page to bring back all the results from immediate manager up to CEO in an ordered approach (i.e. CEO to immediate order).

How could this be achieved?

3
  • You want to show the whole hierarchy for every person on every search result on the People Search Results Page?? May 18, 2016 at 16:28
  • So given an employee's name, show that employee's manager, and the manager of manager upto CEO.
    – Alan
    May 18, 2016 at 22:01
  • I think that kinda figure it out how to do it by checking userProfileProperties.get_extendedManagers(); in a new person search result type template, and pass the values (account names) as parameter to another search result page (KQL) in order to show all managers in the same hierarchy, and finally sort them by LevelsToUp in descending order.
    – Alan
    May 18, 2016 at 22:07

1 Answer 1

0

I achieved this by using KQL as query parameters.

All users in the following query are returned by using userProfileProperties.get_extendedManagers()

And in the sorting part, LevelsToTop is build-in Social Distance field.

.../pages/results.aspx#Default={"k":"domain\\user1 OR AccountName=domain\\user2 OR AccountName=domain\\user3 OR AccountName=domain\\user4 OR AccountName=domain\\user5","o":[{"p":"LevelsToTop","d":1},{"p":"LastName","d":0}]}

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.