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

%3CLINGO-SUB%20id%3D%22lingo-sub-100333%22%20slang%3D%22en-US%22%3EHighlighted%20Content%20Webpart%20filtering%20as%20%22or%22%20instead%20of%20%22and%22%20with%20multiple%20metadata%20filters%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-100333%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20set%20up%20a%20Highlighted%20content%20webpart%20so%20that%20I%20can%20pull%20through%20specific%20documentation%20into%20a%20communication%20site%20view%20for%20end%20users%20to%20access.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20idea%20behind%20this%20is%20that%20our%20training%20team%20has%20all%20the%20training%20documents%20in%20their%20document%20library%2C%20each%20document%20is%20tagged%20with%20%22Finance%2C%20Compliance%2C%20IT%22%20etc.%20What%20we%20want%20to%20do%20is%20surface%20onto%20a%20%22Finance%20Page%22%20all%20of%20the%20%22Finance%20Training%22%20documents%20in%20one%20webpart%2C%20and%20in%20another%2C%20all%20of%20the%20%22Finance%20Policy%22%20documents.%20So%20we%20have%20set%20up%20as%20follows%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETraining%20document%20library%20contains%20all%20training%20docs%3C%2FP%3E%3CUL%3E%3CLI%3EEach%20document%20is%20tagged%20with%20their%20function%20(e.g.%20finance)%3C%2FLI%3E%3CLI%3EEach%20document%20is%20tagged%20with%20%22Training%20Document%22%3C%2FLI%3E%3C%2FUL%3E%3CP%3ECompliance%20document%20library%20contains%20all%20policy%20docs%3C%2FP%3E%3CUL%3E%3CLI%3EEach%20document%20is%20tagged%20with%20their%20function%20(e.g.%20finance)%3C%2FLI%3E%3CLI%3EEach%20document%20is%20tagged%20with%20%22Policy%20Document%22%3C%2FLI%3E%3C%2FUL%3E%3CP%3ENow%20I%20have%20set%20up%20crawled%20and%20managed%20properties%20etc.%3C%2FP%3E%3CUL%3E%3CLI%3ESo%20I%20can%20display%20in%20the%20Highlighted%20Content%20webpart%20all%20documents%20tagged%20with%20%22Finance%22%3C%2FLI%3E%3CLI%3EI%20can%20also%20display%20all%20documents%20tagged%20with%20%22Training%20Document%22%3C%2FLI%3E%3C%2FUL%3E%3CP%3EWhat%20I%20want%20to%20do%20now%20is%20bring%20through%20all%20documents%20that%20are%20tagged%20%22Finance%22%20AND%20%22Training%20Document%22.%20However%20the%20Highlighted%20Content%20Webpart%2C%20when%20I%20put%20these%20two%20filters%20in%2C%20bring%20through%20any%20documents%20that%20are%20tagged%20with%20%22Finance%22%20and%20any%20documents%20that%20are%20tagged%20with%20%22Training%20Document%22%20so%20I%20am%20bringing%20through%20all%20the%20Finance%20Policy%20Documents%20and%20the%20IT%20Training%20Documents.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAm%20I%20doing%20something%20wrong%2C%20is%20this%20the%20intended%20behaviour%3F%20Will%20we%20be%20able%20to%20select%20an%20%22and%2For%22%20filter%20soon%3F%20Seems%20crazy%20that%20this%20isn't%20working%20for%20managed%20metadata%20(because%20it%20works%20as%20expected%20when%20you%20use%20the%20%22Title%20contains%22%20filter!)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20any%20help!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDaniel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-100333%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EHighlighted%20Content%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Emodern%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWebPart%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-312472%22%20slang%3D%22en-US%22%3ERe%3A%20Highlighted%20Content%20Webpart%20filtering%20as%20%22or%22%20instead%20of%20%22and%22%20with%20multiple%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-312472%22%20slang%3D%22en-US%22%3EMe%20neither%2C%20i%20do%20not%20understand%20the%20logic%20behind%20this%20poor%20implementation.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-291551%22%20slang%3D%22en-US%22%3ERe%3A%20Highlighted%20Content%20Webpart%20filtering%20as%20%22or%22%20instead%20of%20%22and%22%20with%20multiple%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-291551%22%20slang%3D%22en-US%22%3E%3CP%3EI%20see%20the%20first%20post%20is%20made%20in%202017!%3C%2FP%3E%3CP%3EHow%20could%20the%20modern%20page%20ever%20be%20promoted%20(and%20accepted%20by%20real%20organizations)%20if%20rolled%20up%20content%20from%20multiple%20site(collection)s%20is%20not%20filterable%20with%20the%20most%20common%20business%20rules%20OR%26nbsp%3B%3CSTRONG%3Eand%26nbsp%3B%3C%2FSTRONG%3EAND%3F!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-288074%22%20slang%3D%22en-US%22%3ERe%3A%20Highlighted%20Content%20Webpart%20filtering%20as%20%22or%22%20instead%20of%20%22and%22%20with%20multiple%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-288074%22%20slang%3D%22en-US%22%3E%3CP%3EYes%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F73288%22%20target%3D%22_blank%22%3E%40Sylvie%20Letourneau%3C%2FA%3E%26nbsp%3Bis%20right%20regarding%20Managed%20Properties.%20I%20was%20referencing%20Page%20Properties%2C%20which%20are%20something%20of%20a%20different%20animal.%20Using%20multiple%20Page%20Properties%20does%20produce%20an%20AND%20output.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E...%20it%20just%20makes%20it%20impossible%20(I%20think)%20for%20the%20cross-site%20usage.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-287821%22%20slang%3D%22en-US%22%3ERe%3A%20Highlighted%20Content%20Webpart%20filtering%20as%20%22or%22%20instead%20of%20%22and%22%20with%20multiple%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-287821%22%20slang%3D%22en-US%22%3E%3CP%3EYes%2C%20Raphael%20is%20correct.%20I'm%20seeing%20the%20same%20behaviour.%3C%2FP%3E%3CP%3EWhen%20you%20use%20a%20Managed%20Property%20plus%20one%20of%20the%20drop%20down%20properties%20(Title%2C%20Content%2C%20Recently%20added%2C%20Recently%20changed%2C%20Created%20by%2C%20Modified%20By)%20then%20you%20get%20AND%20results.%3C%2FP%3E%3CP%3EBut%20if%20you%20use%20multiple%20Managed%20Properties%2C%20you%20get%20OR.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-287792%22%20slang%3D%22en-US%22%3ERe%3A%20Highlighted%20Content%20Webpart%20filtering%20as%20%22or%22%20instead%20of%20%22and%22%20with%20multiple%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-287792%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Tim%3C%2FP%3E%3CP%3EThanks%20for%20your%20reply.%20I've%20read%20the%20entire%20thread%20and%20i'm%20not%20sure%20about%20this%3A%20do%20you%20mean%20you%20have%20achieved%20to%20use%20the%20%22highlighted%20content%20web%20part%22%20on%20modern%20sites%20and%20that%20you%20used%20the%20combination%20of%20multiple%20managed%20properties%20with%20%22AND%22%20conditions%20between%20them%20under%20the%20filter%20section%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEverytime%20i%20use%20two%20or%20more%20filters%20conditions%20of%20type%20%22managed%20property%22%2C%20I%20get%20an%20%22OR%22%20behavior%2C%20even%20with%20different%20managed%20properties.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%20for%20your%20reply.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-286832%22%20slang%3D%22en-US%22%3ERe%3A%20Highlighted%20Content%20Webpart%20filtering%20as%20%22or%22%20instead%20of%20%22and%22%20with%20multiple%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-286832%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F220697%22%20target%3D%22_blank%22%3E%40Raphael%20Guisolan%3C%2FA%3E%2C%20I'm%20not%20sure%20it%20translates%20to%20the%20cross-site%20collection%20(do%20you%20mean%20hub%2Fspoke%20sites%3F)%20situation%20you%20describe%2C%20but%20I%20did%20find%26nbsp%3Bdocument%20some%20glimmer%20of%20usability%20in%20the%20Filter%20function%2C%20here%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FSharePoint%2FCommunication-Site-Highlighted-Content-gt-Pages-gt-Managed%2Fm-p%2F274462%23M22609%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FSharePoint%2FCommunication-Site-Highlighted-Content-gt-Pages-gt-Managed%2Fm-p%2F274462%23M22609%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHTH%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-286368%22%20slang%3D%22en-US%22%3ERe%3A%20Highlighted%20Content%20Webpart%20filtering%20as%20%22or%22%20instead%20of%20%22and%22%20with%20multiple%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-286368%22%20slang%3D%22en-US%22%3E%3CP%3EDoes%20anyone%20found%20a%20workaround%20to%20the%20filter%20problem%20of%20the%20%22highligthed%20content%22%20web%20part%2C%20without%20having%20to%20buy%20the%20full%20intranet%20suite%20of%20a%20third-party%20provider%3F%20Is%20there%20any%20way%20to%20get%20the%20cross-site%20collection%20news%20with%20real%20filter%20functions%20without%20a%20big%20development%20and%20without%20having%20to%20buy%20and%20deploy%20expensive%20things%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-271516%22%20slang%3D%22en-US%22%3ERe%3A%20Highlighted%20Content%20Webpart%20filtering%20as%20%22or%22%20instead%20of%20%22and%22%20with%20multiple%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-271516%22%20slang%3D%22en-US%22%3E%3CP%3EJust%20to%20piggy%20back%20on%20this%2C%20apparently%20if%20you%20use%20different%20kinds%20of%20filters%20(for%20instance%2C%20using%20%22created%20by%22%20and%20a%20%22Page%20Property%22)%20then%20you%20get%20an%20%22AND%22%20join.%20If%20you%20filter%20using%20multiple%20filters%20of%20the%20same%20kind%20(like%26nbsp%3Busing%26nbsp%3B%22Page%20Property%20(Department)%20%3D%20Finance%22%20paired%20with%20%22Page%20Property%20(Department)%20%3D%20Sales%22)%2C%20you%20get%20an%20%22OR%22%20join.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20is%20not%20nearly%20fine-enough%20control%20of%20this%20behavior.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20need%20the%20ability%20to%20group%20our%20filters%20to%20create%20complex%20joins%3A%3C%2FP%3E%3CP%3E((A%26nbsp%3BAND%20B)%26nbsp%3BOR%20(C%20AND%20D))%20OR%20((A%20AND%20C)%20OR%20(B%20AND%20D))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20know%2C%20the%20sort%20of%20functionality%20you%20can%20do%20in%20most%20querying%20environments.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(getting%20a%20little%20tired%20of%20Microsoft%20giving%20us%20BACK%20basic%20functionality%20they%20previously%20took%20away%2C%20functionality%20we%20would%20have%20had%20with%20virtually%20any%20other%20development%20environment%2C%20and%20treating%20the%20release%20as%20if%26nbsp%3Bit%20is%26nbsp%3Ba%20%22new%20functionality%22)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-155106%22%20slang%3D%22en-US%22%3ERe%3A%20Highlighted%20Content%20Webpart%20filtering%20as%20%22or%22%20instead%20of%20%22and%22%20with%20multiple%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-155106%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20Daniel%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20issue%20has%20been%20driving%20me%20NUTS.%20They%20should%20have%20resolved%20this%20by%20now%2C%20and%20offered%20the%20%22AND%22%20operand%2C%20but%20they%20still%20haven't.%3C%2FP%3E%0A%3CP%3EIf%20you%20still%20need%20this%20functionality%2C%20please%20vote%20on%20the%20UserVoice%20here%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Foffice365.uservoice.com%2Fforums%2F264636-general%2Fsuggestions%2F32071210-highlighted-content-web-part-allow-multiple-fil%26nbsp%3B%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Foffice365.uservoice.com%2Fforums%2F264636-general%2Fsuggestions%2F32071210-highlighted-content-web-part-allow-multiple-fil%26nbsp%3B%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-140844%22%20slang%3D%22en-US%22%3ERe%3A%20Highlighted%20Content%20Webpart%20filtering%20as%20%22or%22%20instead%20of%20%22and%22%20with%20multiple%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-140844%22%20slang%3D%22en-US%22%3E%3CP%3Ehas%20anybody%20been%20able%20to%20use%20AND%20isnted%20or%20OR%20in%20this%20filter%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-116340%22%20slang%3D%22en-US%22%3ERe%3A%20Highlighted%20Content%20Webpart%20filtering%20as%20%22or%22%20instead%20of%20%22and%22%20with%20multiple%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-116340%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20I%20filter%20on%20multiple%20values%2C%20it%20doesn't%20limit%20my%20results.%20Filtering%20in%20the%20highlighted%20content%20webpart%20is%20just%20implemented%20badly.%20Multiple%20filters%20should%20result%20in%20LESS%20results%2C%20not%20MORE.%20In%20other%20words%2C%20the%20search%20should%20be%20executed%20with%20an%20AND%20statement%2C%20not%20an%20OR%20statement.%20Filtering%20is%20useless%20this%20way.%20Please%20fix%20this%20Microsoft.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

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

11 Replies

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.

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

Hey Daniel, 

 

This issue has been driving me NUTS. They should have resolved this by now, and offered the "AND" operand, but they still haven't.

If you still need this functionality, please vote on the UserVoice here:

https://office365.uservoice.com/forums/264636-general/suggestions/32071210-highlighted-content-web-p...

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")

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, I'm not sure it translates to the cross-site collection (do you mean hub/spoke sites?) situation you describe, but I did find document some glimmer of usability in the Filter function, here:

 

https://techcommunity.microsoft.com/t5/SharePoint/Communication-Site-Highlighted-Content-gt-Pages-gt...

 

HTH

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.

Yes, Raphael is correct. I'm seeing the same behaviour.

When you use a Managed Property plus one of the drop down properties (Title, Content, Recently added, Recently changed, Created by, Modified By) then you get AND results.

But if you use multiple Managed Properties, you get OR.

Yes, @Sylvie Letourneau is right regarding Managed Properties. I was referencing Page Properties, which are something of a different animal. Using multiple Page Properties does produce an AND output.

 

... it just makes it impossible (I think) for the cross-site usage.

I see the first post is made in 2017!

How could the modern page ever be promoted (and accepted by real organizations) if rolled up content from multiple site(collection)s is not filterable with the most common business rules OR and AND?!

Me neither, i do not understand the logic behind this poor implementation.