Modify the Search Result fields inside our "PnP - search results" web part

john john 1,021 Reputation points
2021-12-05T22:26:42.107+00:00

I have a custom list named Contacts which contain 4 fields as follow:-

  • First Name.
  • Last Name
  • Email
  • Customer Name

And I added a "PnP-Search Results" web part + "PnP-Search Box" web part, as follow:-

155114-s11.png

where i will get the following fields inside my Search results:-

Title, Created & Summary.

But how i can modified my Search results' fields to show the following field instead:-

First Name, Last Name, Email &Customer Name?

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Allen Xu_MSFT 13,866 Reputation points
    2021-12-06T02:01:10.857+00:00

    Hi @john john ,

    Have these columns been mapped to managed properties? If they are site columns, they will be mapped to managed properties automatically. Reference: How Do Site Columns Become Managed Properties - Thus Available for Search.

    • In my case, I have five site columns "NamesOfStudents", "DateOfTest", "GradeOfStudents", "Subjects", "TestScore" and they are respectively mapped into five attributes "NamesOfStudentsOWSTEXT", "DateOfTestOWSDATE", "GradeOfStudentsOWSCHCS"...
      155029-image.png
    • Go to edit my PnP - Search Results web part, Click drop-down menu under "Selected properties" section, Uncheck the managed properties of column "Title", "Created" and "Summary" and check the managed properties of column "First Name", "Last Name"...
      155116-image.png
    • Then go to Manage columns section and design the layout:
      155196-image.png

    Those fields will be displayed in your web part:
    155088-image.png

    ----------

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Marina Cicchi 6 Reputation points
    2022-06-08T10:55:32.257+00:00

    Hi. I was trying to use Manage Colum to add the parent folder's name, but it does not give any options to add any fileds.
    209425-image.png

    how can i add this please?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.