I have a search page that I am building that I would like to have display a list of users based on the value in their User Profile.
Some background on our site:
In our SharePoint site, we have an embedded custom web part in our master page that displays a drop down list of values that is stored in their User Profile. The values are a list of Franchise Numbers called UserFranchises. When they select a Franchise, it feeds the value into another field in the User Profile called PreferredFranchise. This only holds one value and changes whenever they select a different franchise from their personal list.
I generally use the Current User Filter and wire the PreferredFranchise field to whatever web part I want to use this as a parameter. So far this is generally used for SSRS reports to display data only pertinent to the user. Unfortunately, I was unable to find a search web part that will accept a parameter from a filter web part.
So, onto my issue…
Using this guide: http://www.sharepointconfig.com/2011/05/how-to-create-a-simple-sharepoint-2010-people-directory/
I was able to configure the Enterprise Search page and use the Append Text To Query field within the People Search Core Results web part to display all users using the contentclass:spspeople query. This works perfectly to display all users.
At this point, I discovered within the People Refinement Panel on the Enterprise Search page that the UserFranchises field was displaying as a Managed Metadata Column. (Unfortunately, this does not display all of the choices that can be found in the field…)
I can perform a search using the franchise number and get a return of all users with that franchise in their UserFranchises field, so I know that search can return results. But how can I wire this in directly without the user having to type in the search? I want it to look at their PreferredFranchise in their profile and use it as a search parameter.
So I figure there must be some way for me to feed in the PreferredFranchise field value of the logged in user into the Append Text To Query field, but for the life of me, I have not found a way to do it.
Any ideas?