Office 365/SharePoint 2013 – Search Result Query Builder with {Site.Url}

Your problem

Table of Contents

For a long time I’ve been trying to restrict a query within my SharePoint Search Result web parts to items in a list within my current site.

Including Path:{Site.Url}/MyList doesn’t seem to do the job. When I’ ve got sub sites which also include lists called MyList then I’m simply getting results from all sub sites as well.

My Solution

Then I stumbled across the following article:

It mentioned the option of escaping the variables. So I included the following in my query:


And now I’m getting the right results returned.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: