OOTB News webpart filtered by more than one managed property doesn't work

Małgorzata Bodnar 31 Reputation points
2020-10-29T13:45:30.947+00:00

In OOTB News web part I want to display news which are filtered by more than one managed property (RefinableString=NEWS and RefinableDate<[TODAY]).

When I set these two filters (RefinableString equals NEWS and RefinableDate before [TODAY]) in the web part I get wrong results - all news including news with RefinableDate>[TODAY] are displayed.

When I add only one filter (RefinableDate before [TODAY]) web part displays only news with RefinableDate<[TODAY] but adding another filter (RefinableString equals NEWS) again leads to wrong results.

In conclusion - filter logic seems to be working incorrectly and is not narrowing down the results at all.

I hope I explained my problem clear enough for you to help me.

Thanks!

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,624 questions
0 comments No comments
{count} vote

Accepted answer
  1. MichaelHan-MSFT 18,016 Reputation points
    2020-10-30T03:28:00.517+00:00

    Hi @Małgorzata Bodnar ,

    Per my test, I got the same results as yours on my end.

    In fact, by design that the filter logic in OOTB News web part works like this: if we add multiple filters, the multiple filters will be combined with OR instead of AND. So if you set two filters in the web part, news that meet one of the conditions will be displayed.

    In your scenario, Results with RefinableDate<[TODAY] and Results with RefinableString equals NEWS will all be displayed

    As a workaround, you could use Highlight Content Web Part to use Custom query filtering(KQL). Thus you could add AND/OR clauses within your queries.

    The query should like this: RefinableDate<today AND RefinableString :"NEWS"

    36221-image.png


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful