Using PnP Modern Search we part why all columns are not showing any data

Iron Contributor

I have added a Search Result inside PnP Modern Search web part, with those settings:

 

image.png

And i added those slots which are linked to Search managed properties:-

image.png

 

and i added those to the Detailed list, as follow:-

image.png

 

image.png

here is a sample of one expression:-

 

 

{{slot item .slots.SalesOrderNo}}

 

 

now i got the items, but all the custom property are empty as follow:-

 

image.png

 

second question, how i can allow sorting the fields i have? such as Destination, Po# ? etc, is this possible?
Keeping in mind that i added the related data 3 days ago
any advice?

3 Replies

Hey @johnjohn-Peter 

 

use the SharePoint Search as data source:

https://microsoft-search.github.io/pnp-modern-search/usage/search-results/data-sources/

 

Otherwise:

You don't need to configure data slots to use columns (Managed Properties!!!) in your search results webpart.

 

1. Map your columns to managed properties

2. add the managed property to the selected properties (page 1 on Search Results WebPart configuration)

3. add the managed property as column, that's all.

DaveMehr365_0-1724216378775.png

 

And yes, you can sort the managed property (see option also on page 1)

 

Best, Dave

@DaveMehr365 Thanks for the reply. but i want to use Microsoft Search as it is more future proof, am i correct?

 

Also the built-in manged property that get created automatically for site columns are not sortable ad we can not edit them to make them sortable, so i need to add the related crawl properties inside Refinable managed property to be able to sort ? am i correct?

Hey @johnjohn-Peter

 

my experience is, it's simplier to use the SharePoint Source in PnP Search WebParts at the moment.

 

That's correct, you need to map the crawled properties to sortable refinablestrings.

 

Best, Dave