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?
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.
-
Might be a stupid question but where would I add
and name<>[username2] and name<>[username2]
? Right afterDepartment:"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