0

I'm following this tutorial on how to use kql to query against terms.

I've set up a page with a content search web part and in the query builder I've entered this

owstaxIdLocation:GP0|#ad491ed9-c21c-46d9-896c-c0d148957c60

Items tagged "Mumbai" from the example on the tutorial. In the result source there are items tagged with that and they are returned. Good.

Now I want to get fancy and pass the value in a query string parameter. So I change my query builder to

owstaxIdLocation:{Querystring.locationtag}

It kinda seems to work, but if I try and put the GP0!# (or the other prefixes like GPSet|#) it breaks. I tried encoding the param value for example

?tag=GP0%7C%2362417a66-e677-4ede-8823-58cdd764e7e4

Any idea how to include a full term in the query string parameter for use by a CSWP in a KQL query?

1 Answer 1

1

You need to pass the value in query string like this:

locationtag=%230TermGUID*

replace TermGUID above with the guid of the Term

1
  • I owe you a drink man for this one. Commented Jul 27, 2020 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.