0

I am implementing the PNP Modern Search v4 web part package in my site. My libraries have custom columns (Client Name, Document Type, etc.) that I am bringing back to my query results.

The trouble I'm having is that I'm trying to add the Filter component to the page, but the web part is not recognizing the data from my custom columns. It works for the standard columns.

Has anyone implemented this web part pack, using custom columns?? Any help would be REALLY REALLY appreciated!!!

3 Answers 3

0

You need to ensure that the data is "refinable", otherwise it wont show up in your filter web part.

So first step is to go to the search schema and find the property you are trying to refine (filter) on. You can either do this through the SharePoint admin module or through site settings --> Schema. But note that working on the site will only apply to that specific site (which might be ok in yor scenario).

In the Schema search for the internal name of the field you want to refine on. Click on the name and verify that it is indeed possible to refine (will be marked with a "refine").

Most likely you will need to go to crawled properties in the search schema, find the field in question and then click "map" and map that field to a RefinableString. You can then use the refinablestring in the filter webpart (remember to also add the refinablestring to the result web part).

6
  • Thanks for the reply. We have checked that the fields are marked refinable at the Admin level. We learned of this step when we were not getting data to return in the Search results web part. We now get data in the search results - but the data is not "passing" to the filter web part. Jan 25, 2022 at 14:53
  • And have you added the refinablestring as a property in the search result web part?
    – RuneBH
    Jan 25, 2022 at 16:01
  • we added that string value to the Selected Properties dropdown. We see that Refinable and RefinableString appears checked. (Wish I could include a screenshot!) When we define the columns to display in the web results part - is there something there that is needed? We have the correct "internal" name for the field. As noted - the results displays values. The Filter is just not acknowledging them. (And it's only our custom columns that have the issue.) Jan 26, 2022 at 20:17
  • You can upload a picture, and yes that would perhaps make it a but easier to see what is going on here. What type of columns are the custom columns?
    – RuneBH
    Jan 26, 2022 at 21:16
  • 1
    the only way I saw that I could upload a picture was by submitting an Answer to my question. It's not actually answered. Jan 28, 2022 at 15:32
0

Here's a screenshot of the refiners.

The columns are simple single line text. This is where we have refinablestring entered in the properties input - and you can see when expanded - refinable and refinablestring are listed and checked.

6
  • 1
    Hmm, it looks like you have created a new managed property called "Refinablestring". If this is the case I dont believe that will be "refinable" actually... I would try to map the crawled property to one of the build in refinable strings, called something like "RefinableString00".
    – RuneBH
    Jan 28, 2022 at 21:53
  • @RuneBH - we created a PDF that has the step-by-step actions we took to get where we are. Would it be possible for you to review the steps to see where we overlooked something? We've tried all the ideas we can think of -- and even retraced the steps in a secondary site to no avail. drive.google.com/file/d/1SGiBM-RdZc4__in8y9ZLbH-IDrI7q7XZ/… I can't upload a file to StackExchange - so without a huge series of postings this is the only means I have of detailing our steps. Feb 3, 2022 at 20:30
  • great document. It seems fine and should be working. So for me the issue must be with the property. It is not all properties that are refinable. They will show up in the search result box, but you wont be able to refine on them in the filter. Im guessing since ClientName might be a crawled property or a custom managed property that it is NOT refinable. Go to the search schema on the below url and confirm that the "Refine" value is not blank. https://{name of tenant without the curly braces}-admin.sharepoint.com/_layouts/15/searchadmin/ta_listmanagedproperties.aspx?level=tenant
    – RuneBH
    Feb 4, 2022 at 7:44
  • @RuneBH - after going to the link - we see that all of the custom columns we've created have the refine value being blank. What can be done to change that condition? On another note - this morning, the filter component started working (kinda....) We started to get Client Name to appear in the filter web part - but often it had no refineable values. Through testing - we found that if Client Name had any non-alphanumeric characters - the filter contained no values. So -- if my client name value was "Xerox" - it worked. If the value was "Tik Tok" - it didn't work. Feb 4, 2022 at 17:02
  • OK, so far so good. Basically you just need to follow the points in my answer below (I kinda had a feeling it would be a faulty property). Go to the search schema, under the Managed properties find and open one of the "RefinalbeString" properties (ensure that it is not used by someone else in your organization). Click on it, and under the "Map" property search and select the internal name of the ClientName column (perhaps like ows_ClientName), click ok. Go to your site, create a new item with ClientName filled out, reindex the list (or wait 5-20 min). Then it should work :) @VASoftball5
    – RuneBH
    Feb 4, 2022 at 20:23
0

Here's a screenshot of the Search results web part column setup. ClientName is one of the custom columns we're trying to filter. We have a couple others of similar structure.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.