1

I have to filter my search result WP using a query string parameter in the KQL query:

myfield:{QueryString.XXXX}.

I need to be able to define a default filtering or default value for myfield if the query string parameter is empty.

How could achieve that?

2

You can use the ? operator. For example: {?myfield:{QueryString:XXXX}} will not effect the outcome of the query if the field has no value. You may have to play with it a bit but all the details are well documented and explained by Mikael: https://www.itunity.com/article/sharepoint-query-variables-295

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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