Your problem

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:

https://technet.microsoft.com/en-us/library/jj683123.aspx

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

Path:{\Site.Url}/MyList

And nowย I’m getting the right results returned.


Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Related Posts

Leave a Reply

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