Answered by:
Search user profile based on specific property

Question
-
I have a requirement to search a user profiles based on specific property like LastName='John' in 'IT' Department
I'm using search pattern in userprofilemanager.search()
string[] searchPattern = { “LastName = 'smith'”, "Department='IT'"};
I'm not able to get result as i'm passing above mentioned search pattern.
i need to search for specific Property field, instead of searching all properties.
Can u please help me out of that.
Thursday, February 9, 2012 11:04 AM
Answers
-
You can read the following link about how to use the SearchPattern with the Search method. The SearchPatter does not support name value syntax. It will search a set of fixed searchable user profile properties for the comman delimitted strings you provide as an argument.
http://blogs.msdn.com/b/yardman/archive/2010/06/29/sharepoint-userprofilemanager-search-method-sample.aspx
Blog | SharePoint Field Notes Dev Tool | ClassMaster
- Marked as answer by Shimin Huang Sunday, February 19, 2012 8:25 AM
Thursday, February 9, 2012 3:33 PM -
as much as i know, there is hot fix for that-
Thanks
ARUN
- Marked as answer by Shimin Huang Sunday, February 19, 2012 8:25 AM
Thursday, February 9, 2012 3:56 PM
All replies
-
You can read the following link about how to use the SearchPattern with the Search method. The SearchPatter does not support name value syntax. It will search a set of fixed searchable user profile properties for the comman delimitted strings you provide as an argument.
http://blogs.msdn.com/b/yardman/archive/2010/06/29/sharepoint-userprofilemanager-search-method-sample.aspx
Blog | SharePoint Field Notes Dev Tool | ClassMaster
- Marked as answer by Shimin Huang Sunday, February 19, 2012 8:25 AM
Thursday, February 9, 2012 3:33 PM -
as much as i know, there is hot fix for that-
Thanks
ARUN
- Marked as answer by Shimin Huang Sunday, February 19, 2012 8:25 AM
Thursday, February 9, 2012 3:56 PM