Pergunta

I am trying to use a content query web part on SharePoint 2010 Server and filter on site columns of type "Managed Metadata". These columns do not show up int the available columns drop down in the filter configuration. Does anyone know why? Is this a bug/by design?

Foi útil?

Solução

I finally managed to send the Managed Metadata fields to my XSLT by setting them in the property DataMappings and DataMappingViewFields. Setting them in CommonViewFields did not work. I also have to define ListUrl AND ListName.
Although I don't need the GUID of the list using this method, I still need the GUID for the Managed Metadata fields.

So the essential pieces would be like this:

<property name="WebUrl" type="string">~sitecolection/someplace/myweb</property>
<property name="ListUrl" type="string">~sitecolection/someplace/myweb</property>
<property name="ListName" type="string">Pages</property>
<property name="DataMappings" type="string">NameUsedInXSLT:{guid-that-belongs-to-managed-metadata-field},NameOfManagedMetadataField,TaxonomyFieldMulti;</property>
<property name="DataMappingViewFields" type="string">{guid-that-belongs-to-managed-metadata-field},TaxonomyFieldTypeMulti;</property>

And that's it.
I didn't find any way to not use guid for Managed Metadata fields.
And you can still specify other non-Managed-Metadata-columns you use in the property CommonViewFields

Outras dicas

I'm not sure, but I'm pretty sure that the Managed Metadata column is sort of like the Multiple Choice column type - that it can store multiple values, and thus can't be filtered in the CQWP.

(If you think about it, the database query would have to match on only part of the value that's serialized into the database field, and hence it would be REALLY slow)

I think... ...can't say that I've checked.

Managed metadata columns can be used in the CQWP till they are not selected to allow multiple values when you define then under site columns. Once you have selected them to allow multiple values , CQWP will treat them as a Mulitple Choice column type and will not display them under the Allowed Columns dropdown...

I was able to show the "managed metadata" column in the filter dropdown when I specified a specific library/list.

It doesn't show up when any of the following source is selected which is frustrating, alright.

  • Show items from all sites
  • Show items from the following sites and all subsites

I always have my MM Site Columns as not Multi Valued, but in the Library where they are used, I make it Multi-Valued. So CQWP always works in that scenario when picking values

Hmm nope I have used Managed Metadata columns as part of CQWP numerous times. Its actually one of the new features of the CQWP.

I think that you might have something incorrect with the query in the CQWP, do you see all the other columns because it seems strange that you cant see Managed Metadata columns.

Cheers

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top