SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way of making the Fixed Keyword Query in search core web part to get the current user login (Author:{CurrentUser}).

share|improve this question
up vote 2 down vote accepted

I wish there was a builtin way to do that, but there is not. You will need to write a custom Web Part which inherits from CoreResultsWebPart. You can then use the QueryManager object to change the value of the query.

share|improve this answer
Good answer, although there doesn't seem to be a QueryManager object in CoreResultsWebPart. Overwriting the FixedQuery property will do it. – Jasper Jul 11 '12 at 8:11
Update (struggling with it myself): there is a SharedQueryManager.GetInstance property which let's you retrieve a SharedQueryManager object. That one has a QueryManager object to influence the query. – Jasper Jul 11 '12 at 11:38

You can use fixed keyword query in core search results web part. Just modify the web part and enter your query in the relevant property.

share|improve this answer
That wasn't the question, the question was if he could add something like [Me] or Current User to the fixed field, which can't be done apparantly. – Jasper Jul 10 '12 at 15:30

Your Answer


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.