SOLVED

Site Page - PNP Search Box web part - Syntax to use managed property

Steel Contributor

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?GitHub_PNPSearchBox.PNG

2 Replies
best response confirmed by Eric Deferm (Steel Contributor)
Solution

Hello @Eric Deferm 

 

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 

Hi 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.
1 best response

Accepted Solutions
best response confirmed by Eric Deferm (Steel Contributor)
Solution

Hello @Eric Deferm 

 

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 

View solution in original post