Forum Discussion

Daniel Barnby's avatar
Daniel Barnby
Copper Contributor
Aug 24, 2017

Highlighted Content Webpart filtering as "or" instead of "and" with multiple metadata filters

Hi All,

 

I am trying to set up a Highlighted content webpart so that I can pull through specific documentation into a communication site view for end users to access.

 

The idea behind this is that our training team has all the training documents in their document library, each document is tagged with "Finance, Compliance, IT" etc. What we want to do is surface onto a "Finance Page" all of the "Finance Training" documents in one webpart, and in another, all of the "Finance Policy" documents. So we have set up as follows:

 

Training document library contains all training docs

  • Each document is tagged with their function (e.g. finance)
  • Each document is tagged with "Training Document"

Compliance document library contains all policy docs

  • Each document is tagged with their function (e.g. finance)
  • Each document is tagged with "Policy Document"

Now I have set up crawled and managed properties etc.

  • So I can display in the Highlighted Content webpart all documents tagged with "Finance"
  • I can also display all documents tagged with "Training Document"

What I want to do now is bring through all documents that are tagged "Finance" AND "Training Document". However the Highlighted Content Webpart, when I put these two filters in, bring through any documents that are tagged with "Finance" and any documents that are tagged with "Training Document" so I am bringing through all the Finance Policy Documents and the IT Training Documents.

 

Am I doing something wrong, is this the intended behaviour? Will we be able to select an "and/or" filter soon? Seems crazy that this isn't working for managed metadata (because it works as expected when you use the "Title contains" filter!)

 

Thanks for any help!

 

Daniel

12 Replies

  • Does anyone found a workaround to the filter problem of the "highligthed content" web part, without having to buy the full intranet suite of a third-party provider? Is there any way to get the cross-site collection news with real filter functions without a big development and without having to buy and deploy expensive things?

      • Raphael Guisolan's avatar
        Raphael Guisolan
        Brass Contributor

        Hi Tim

        Thanks for your reply. I've read the entire thread and i'm not sure about this: do you mean you have achieved to use the "highlighted content web part" on modern sites and that you used the combination of multiple managed properties with "AND" conditions between them under the filter section?

         

        Everytime i use two or more filters conditions of type "managed property", I get an "OR" behavior, even with different managed properties.

         

        Thanks in advance for your reply.

    • Tim Rohr's avatar
      Tim Rohr
      Copper Contributor

      Just to piggy back on this, apparently if you use different kinds of filters (for instance, using "created by" and a "Page Property") then you get an "AND" join. If you filter using multiple filters of the same kind (like using "Page Property (Department) = Finance" paired with "Page Property (Department) = Sales"), you get an "OR" join.

       

      That is not nearly fine-enough control of this behavior.

       

      We need the ability to group our filters to create complex joins:

      ((A AND B) OR (C AND D)) OR ((A AND C) OR (B AND D))

       

      You know, the sort of functionality you can do in most querying environments.

       

      (getting a little tired of Microsoft giving us BACK basic functionality they previously took away, functionality we would have had with virtually any other development environment, and treating the release as if it is a "new functionality")

  • When I filter on multiple values, it doesn't limit my results. Filtering in the highlighted content webpart is just implemented badly. Multiple filters should result in LESS results, not MORE. In other words, the search should be executed with an AND statement, not an OR statement. Filtering is useless this way. Please fix this Microsoft.

    • Alberto Palma's avatar
      Alberto Palma
      Copper Contributor

      has anybody been able to use AND isnted or OR in this filter ?

Resources