Forum Discussion

vassp1980's avatar
vassp1980
Copper Contributor
Oct 16, 2024

Managed Property not showing up correctly as a filter in PNP Search filter

Hello Folks,

 

I am having trouble getting a managed property (a SharePoint Library column) show up in the PNP Search filter correctly. The name of this column is "Document Department".

 

There are 2 document Libraries "Working Library" and a "Published Library".  This column exists as a choice column originally in the Working Library.  Power Automate processes documents through a workflow, and eventually populates the values into the same column in the Published Library. 


Here is the column that eventually gets its values updated by the workflow (Below is screenshot of this column from Published Library)

 

 

 

For getting this field to appear in PNP Search filters, I am using a existing managed property called "Refinablestring01", and mapped it to the "Document Department" as shown below (it is set as retrievable, refinable as shown in image)


This column (When checking in Library settings) is actually called Document Department, which I did verify (so that I know which crawled Property I should map the RefinableString01 to)

 



I then did a site reindex and this refinablestring01 shows up in pnp search filter


However when publishing this, the Document Department values are not showing correctly, instead it's showing some numeric values instead of department names

 

But when I select the options in this filter, it does appear to filter correctly for that specific department. For example, when I select the last one "2", the search results does filter for documents pertaining to "Project Delivery" (PD) , which is one of the actual departments in the choice values. 


 I am not sure why are numeric values being shown on the pnp search filter on the left, instead of the actual names of the Departments. Any advice would be appreciated



 

  • grant_jenkins's avatar
    grant_jenkins
    Steel Contributor

    vassp1980 It might be that you've mapped your Refinable String to the incorrect Crawled Property.

     

    For a Choice column you should be mapping to a Crawled Property using the naming convention ows_InternalColumnName.

     

    For example, if the internal name of my choice column was "Legal" then I would map the Refinable String to the Crawled Property ows_Legal.

     

    To confirm the internal name, go into the Library settings and click on the column.

     

     

    Have a look at the following site for some good info.

    Crawled Properties naming convention in SharePoint Online | SharePoint Maven

    • vassp1980's avatar
      vassp1980
      Copper Contributor

      Hi

      Thanks for the reply. Ok so as per your instructions, I did the following : 

      • Confirmed that the internal name of this coluimn is : DocumentDepartment

         

       

       

       

       

       

      • I created managed property "RefinableString01" and mapped it to all related crawled propertoes I could find, related to department. As you can see I have also mapped it to "OWS_Department"

       

       

       

      • Now after site reindex, and waitin for many days, I check the pnp search page, in the search results webpart, and the filters webpart. I am selecting the RefinableString01

         

         



       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      It still doesn't show up in the filters

       

  • MacAdjeh's avatar
    MacAdjeh
    Copper Contributor
    Hello,
    I don't all the issues but I solved something like that by creating the columns in the columns list at the site collection level. Not at the list or library level.

    I will come back to you if I get all your points.
    • KasperLarsen's avatar
      KasperLarsen
      Iron Contributor

      That is 100% correct. If you are planning to use the columns for anything search related, they MUST be created as site columns rather than list columns, unless you loved to spend lots of time setting up the mapping. 

      • vassp1980's avatar
        vassp1980
        Copper Contributor

        So you are suggesting the following?
        -Create a Site column "Document Department" as choice column
        -Add this Site column to the Library view
        -Use a "Refinablestring" mapped property, and map it to the crawled property (ie. the site column "Document Department"). I assume it shd appear as "ows_document_Department" or something like that

        -Then it should appear in the pnp search filters 

        Is that correct?

    • vassp1980's avatar
      vassp1980
      Copper Contributor

      Hello did you manage to check this issue? I still have the problem, so wondering if you can help.

      i tried mapping the managed property to all possible crawled properties that have Document department name in it. 

      Still I can't fix this problem

Resources