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.
    – Salah
    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.

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