Forum Discussion

Dean_Gross's avatar
Dean_Gross
Silver Contributor
Feb 05, 2019

News Web Part - filter by Managed Metadata

I have added a Managed Metadata (with allow multiple choices enabled) column to the Site Pages library. When I use the News web part and choose the Page Properties filter, i can set it "Equal" to a value, but I can't use Contains or any other filter type. This prevents us from displaying a news article that has more than one attribute selected in the Managed Metadata column.

Is this is a known limitation or a bug?

  • Rachel_Davis's avatar
    Rachel_Davis
    Steel Contributor
    I use regular choice columns in my site pages library and they work fine. Then I filter the news web part on a choice value and it's fine.
    • nipW's avatar
      nipW
      Brass Contributor
      When I add Two filters like Managed Property
      1st filter - News type = Main News
      2nd filter - IsActive = Yes
      It filters with OR not AND. How can I get AND condition?
      Thanks.
      • Joe Ayre Work's avatar
        Joe Ayre Work
        Brass Contributor

        nipW Not the most elegant solution but you could create a calculated column that fuses 'News type' and 'IsActive' together, and then filter on the calculated column e.g. MainNewsYes 

  • Aragorn's avatar
    Aragorn
    Iron Contributor

    Hi Dean,

     

    Did you find a solution to this? I'm having the same problem. I have a custom column in the pages library but unable to filter by it in the News web part. I selected 'page properties' in the filter but my custom column doesn't show. I only have 'Title'.

     

    Thanks

    • Dorje-McKinnon's avatar
      Dorje-McKinnon
      Steel Contributor

      Hi Aragorn 

      I just checked my modern sharepoint intranet home page, news carosel.

      In the webpart filter, the only drop down options I have are a "blank" drop down item and "title" item, then the equals,contains etc drop down

      I thought that the news filter used to have a "managed property" drop down option along with the "title" option. But I may be mistaken. When I checked just now only the "Highlighted content" web part had the "managed property" filter option.

      Perhaps you could use "Highlighted" content Paul ?

       

      • JuanBij12's avatar
        JuanBij12
        Copper Contributor

        Dorje-McKinnon 

        The Managed Property only appears in the drop down (inside the news web part) if you choose "select sites" under "select a news source". !

        If you choose "this site" then the managed property is not available! strange...

  • Hi Dean_Gross 

    I have exactly the same issue. 

     

    As a news manager/page owner I need to be able to add multiple items as filters specifying X and Y as well as X or Y categories. So that I can show the news I want on my page.

     

    It took me a while to figure out that to see if my filter had worked I had to click the "Apply" button (different functionality to other modern webpart filter settings).

     

     

    Dorje

    • Vincent_Nguyen's avatar
      Vincent_Nguyen
      Copper Contributor
      I did add a new column name "category" with "Choice" Type but I did not see it from the dropdown of Managed Property. How do you able to show the category property from the Managed property dropdown?
      Thank you.
      • Dorje-McKinnon's avatar
        Dorje-McKinnon
        Steel Contributor

        Hi Vincent_Nguyen 

        I'm not very sure how to answer your question but I think, there may be a difference between the Library Columns and the ContentType columns.

        The library has the Category column , but the ContentType for your files doesn't know about that column so you'll need to alter the ContentType to show the new column in your library.

        I'd suggest you do some reading before just changing things. Generally you don't want to change the "Site Page" content type, but make a Child content type e.g. VincentsSitePage with the "Site Page" as it's parent.

        Then add your Category column to VicentsSitePage, then change all your pages over to VicentsSitePage content type, and make it the default for the library.

        Then when you view the properties of a page it will show the columns related to it's content type (which is now VincentsSitePage) , which contains Category.
        Sorry this is getting into more advanced SharePoint admin tasks. 

Resources