Aug 20 2024 03:18 PM - edited Aug 20 2024 03:20 PM
I have added a Search Result inside PnP Modern Search web part, with those settings:
And i added those slots which are linked to Search managed properties:-
and i added those to the Detailed list, as follow:-
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:-
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?
Aug 20 2024 10:01 PM
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.
And yes, you can sort the managed property (see option also on page 1)
Best, Dave
Aug 21 2024 02:17 AM
@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?
Aug 21 2024 10:48 PM
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