Question

I have a landing page with a content search webpart that I want to be dynamically filtered by an URL like this one http://mysharepoint.com/site1/home.aspx?tagterm=#0a1658abf-cc9d-495c-a8cc-e25953aad57e. It should be grabbing the term GUID from the term store and filtering upon it in the query below but it returns nothing after I save close the query dialog box. While editing the query the and testing in the TEST tab it works perfectly. Am I missing some sort of special encoding from the URL? I added some visual examples below.

enter image description here

The query:

owstaxidmetadataalltagsinfo:{QueryString.tagterm} (contentclass:STS_ListItem OR IsDocument:True) (ContentTypeId:0x010100B49CA5009A6365469E63CD3AC5F1FDA8* OR ContentTypeId:0x01010A00ED2A591570802345BA22687CF8A919F1*)

Results from the TEST tab enter image description here

Why would results return in test but not from the URL?

Was it helpful?

Solution

I found out the issue is that because of the special characters in the URL you have to put them inside double-quotes for them to work.

The url now looks like http://mysharepoint.com/site1/home.aspx?tagterm="#0a1658abf-cc9d-495c-a8cc-e25953aad57e"

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top