Forum Discussion

RogerCP66's avatar
RogerCP66
Copper Contributor
Mar 29, 2024
Solved

SharePoint PnP Modern Search v4 to Display results from a specific folder in a library

Hello,

I am trying to setup PnP search on a site to return results from a specific folder in another site. When I connect the results display, I am able to get the search results working and showing results from the folder I want. I can’t seem to get the related search bar to work.

This is my query on the search results which is returning the correct number of pictures that are in the folder.

 

{searchTerms}Path:"https://tenant.sharepoint.com/sites/sitename/ libraryname "

(FileType:jpg OR FileType:jpeg OR FileType:png OR FileType:tif)

RootFolder:"foldername"

 

on page 3 I select Use Input Query text >Dynamic Value> connect to source (PnP - SearchBox)> Pnp Search Box Properties (Search Query)

 

I then added the search box and under available connections selected connect to source (PnP Search Results Properties selected the library> then the third dropdown for the properties and am presented with 2 options (AvailableFieldsFromResults and AvailableFilters). Either selection does not change the results.

 

I can always get the results to show up from the correct folder but cannot get the search box to show me any results when I try to refine the search.

 

 

Resources