Sharepoint 2016 on prem Content Query Web part site collection mutli select managed metadata

bsim 1 Reputation point
2020-09-02T21:43:51.183+00:00

Was hoping this issue was resolved in SP 2016. I'm on prem with a public facing website.

I have 3 managed metadata term sets setup. I created a site column for each term set. I created both multi value select and singe select managed metadata columns.
With single select columns i can use cqwp to query the entire site collection and pull pages based on a term or any term within termset.

The issue is the end goal is to allow users to tag pages with up to 3 terms within each term set.
I've found the only way to use content query web part with multi-select is to point to a specific page library. In my case I need to query the entire site collection.

Is this possible with cqwp or any other web part for that matter? Are there custom solution options or is this a limitation with managed metadata?

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,271 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,590 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Jerryzy 10,566 Reputation points
    2020-09-03T07:11:46.613+00:00

    Hi @bsim ,

    This should be a limiation that when selecting source "Show items from all sites in this site collection" or "Show items from the following site and all subsites" in Content Query Web Part, the multi-value managed metadata column will be removed, only selecting "Show items from following list", the multi-value managed metadata column is available.

    The reason of the limitation is because of the WSSID is different for each site and this WSSID is used in filtering as a Lookup Id in Content Query Web Part using CAML Query like this:

    <Query><Where><In><FieldRef LookupId="TRUE" Name="ItemType" /><Values><Value Type="Integer">14</Value><Value Type="Integer">15</Value></Where></Query>  
    

    Please check the blog for details:

    SharePoint: Querying on Multiple-Select Managed Metadata Columns in Content Query Web Parts

    A solution is writing a custom web part with SharePoint Server Object Model, get WSSID for each site using the method and build CAML Query with these returned WSSID:

    TaxonomyField.GetWssIdsOfKeywordTerm


    If the response is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

  2. Jerryzy 10,566 Reputation points
    2020-09-03T08:18:32.687+00:00

    Hi @bsim ,

    Another solution is using Content Search/Search Results web part to query and filter based on the multi-value managed metadata column managed proerpty like this:

    22326-snipaste-2020-09-03-16-17-25.png

    This could search for site collection level and support for multi-value managed metadata column .


    If the response is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments