2

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?

1 Answer 1

0

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.

4
  • 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. Commented Nov 15, 2011 at 14:19
  • I think this should help : consultingblogs.emc.com/paulgalvin/archive/2008/03/11/… Commented Nov 15, 2011 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 Commented Nov 15, 2011 at 15:23
  • Got it working with: Department:"IT" NOT FirstName:"username" AND JobTitle<>"title" . Thx for the help! Commented Nov 16, 2011 at 10:17

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.