Forum Discussion

johnjohn-Peter's avatar
johnjohn-Peter
Iron Contributor
Aug 20, 2024

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

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?

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.

     

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

     

    Best, Dave

    • johnjohn-Peter's avatar
      johnjohn-Peter
      Iron Contributor

      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?

      • DaveMehr365's avatar
        DaveMehr365
        MVP

        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   

Resources