Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm using a Search Paging web part with the People Search Core Results web part in order to display users in specific departments on my site (thx Mike Oryszak for pointing me in the right direction). I'm using a Fixed Keyword Query in order to get the specific departments (like Department:"IT"). Is there any way to filter out certain users depending on their properties, like title or name?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

If users are few and you know them in advance, You can exclude them in keyword query itself. For e.g :

Department:IT and name<>[username2] and name<>[username2]

Or You can implement custom security trimmer for more flexibility.

share|improve this answer
    
Might be a stupid question but where would I add and name<>[username2] and name<>[username2]? Right after Department:"IT" in the Fixed Keyword Query? Can't seem to get it to work. –  K.W Nov 15 '11 at 14:19
    
I think this should help : consultingblogs.emc.com/paulgalvin/archive/2008/03/11/… –  Yuri Leontyev Nov 15 '11 at 14:42
    
yes, this way you construct a keyword query to not include user with 'name=username'. For more details on syntax, please check :msdn.microsoft.com/en-us/library/ff394509.aspx –  Amit Kumawat Nov 15 '11 at 15:23
    
Got it working with: Department:"IT" NOT FirstName:"username" AND JobTitle<>"title" . Thx for the help! –  K.W Nov 16 '11 at 10:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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