Forum Discussion
Site Page - PNP Search Box web part - Syntax to use managed property
I've put the PnP-Search Box web part on a modern SP Page and would like to retrieve the text (search term) input from a user to launch a search using a managed property (RefinableString80).
When performing a manual search in a modern Document library using the search box at the top by specifying the managed property & search term as follows: RefinableStringi80:Feldspar, the search returns the expected results. When investigating the URL it shows the following format
...?view=7&q=RefinableString81%3AFeldspar .
When using the PnP-Search Box web part on a page I can't find a proper way to obtain the same result. I've tried multiple combinations, yet either the entered search term is not coming true or the URL syntax is different > see image.
How to configure the 'Parameter name' o/t PnP-SB web part to obtain the same URL syntax as described above?
Hello EricDeferm
i have created a search scenario tutorial about "Use query string from url for dynamic results"
https://microsoft-search.github.io/pnp-modern-search/scenarios/use-query-string-in-url/
Maybe it can help you, otherwise come back to me.
Best, Dave
2 Replies
Hello EricDeferm
i have created a search scenario tutorial about "Use query string from url for dynamic results"
https://microsoft-search.github.io/pnp-modern-search/scenarios/use-query-string-in-url/
Maybe it can help you, otherwise come back to me.
Best, Dave
- EricDefermSteel ContributorHi David, tx a lot for sharing your very valuable tutorial. It was well explaining the right approach to configure the PnP search web parts and it allowed me to setup a working solution.