4

I'm using a standard content search web part. I have a querystring filter on the HRPortalRole managed property like this:

HRPortalRole:{QueryString.role}

When I provide a value in the querystring, everything is working fine but if I don't specify a value in the querystring it is not showing any content.

I basically want to ignore the filter when it is not there. So if my url doesn't contain the role parameter in the query string I just want to show all content no matter what role it has. Is this somehow possible?

1 Answer 1

5

This did the trick:

{?HRPortalRole:{QueryString.role}}
1
  • It seems like it doesn't work on SP2016 On-Premises, unfortunatelly. Commented Jun 26, 2020 at 13:42

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.