Forum Discussion
Filtering a Content Query Web Part using query string parameters in SharePoint Online (Modern Pages)
- Feb 05, 2024
Hello MrUhderhill
i think this PnP Modern Search scenario tutorial can help you, right?!
https://microsoft-search.github.io/pnp-modern-search/scenarios/use-query-string-in-url/
Best, Dave
Hi DaveMehr365, thank you so much for your feedback.
Apologies as I failed to mention that we are using the React Content Query for modern pages, which we download a while ago, we are going to check again to see if there is a new version or ask for feedback there.
I do have a follow up question for you. I like the approach of using search, but let's say you are building a site to manager your Vendors. So you have a Vendors List, a Vendor Contacts List and a Vendors Document Library. I can easily build a search page that will allow me to search and facets to filter the results, etc. What if I wanted my users to click on a Vendor on the search results and take them to a Page that will display all the information of that vendor (vendor information, contacts and documents), how would you go about building this? I tried building a page with 2 List Content Parts and a Document Library and connecting the parts via Dynamic Filtering, but I'm having a hard time to filter the Vendor List with one via Query String parameter.
Let me know your thoughts on this. Thank you
Hello MrUhderhill
i think this PnP Modern Search scenario tutorial can help you, right?!
https://microsoft-search.github.io/pnp-modern-search/scenarios/use-query-string-in-url/
Best, Dave
- MrUhderhillFeb 05, 2024Brass Contributor
Hi DaveMehr365 , yes, this should work. We also learned that the React Content Query webpart now supports query string parameters so we are going to try both.
Thank you for your help