SharePoint - ContentQueryWebPart, CommonViewFields and Multi-value choices

When you add a choice or lookup to the CommonViewField for a ContentQueryWebPart, if you had ticked the allow multiple-values checkbox, the CQWP will return you nothing.

Couple of people blogged about this:

http://sridharu.blogspot.com/2008/05/content-query-webpart-customization.html

http://blogs.msdn.com/ecm/archive/2006/10/25/configuring-and-customizing-the-content-query-web-part.aspx

Adri Verlaan [MSFT] even says:

Unfortunatly the data source that the CQWP uses does not support Mutli-Valued Lookups or Multi-Choice columns.

 

Turns out after a bit more digging around, you _can_ use multi-value choices.  To get multi-value choices to work, you need to use a different type:

Instead of Choice, use MultiChoice

<property name="CommonViewFields" type="string">MyDescription,PublishingHtml;MyTags,MultiChoice</property>

I have not had much luck with Multi-lookup and I suspect there might be some truth in what Adri was referring to.  If I consider how SharePoint might have to work with a field that contains multiple keys to a different lookup list, this problem becomes far more complex.

Anyway, at least it works for choice.

Have fun!

jliu