Thursday, December 17, 2009

CommonViewFields - String Formatting Issue

CommonViewFields property allows you to include additional columns to the filter or display of the Content Query Web Part. You can provide semi-colon separated list of columns and column names are separated from datatype by a comma.


<property type="string" name="CommonViewFields"> ArticleStartDate, Date;Countcomments, lookup;PageURL, lookup;</property>


There is a known bug to this. In some specific SP environments while importing the web part with the format above you might receive an error. This is because of the formatting of the string. You need to remove all white space and also the “;” from the last colunmname-datatype pair.


<property type="string" name="CommonViewFields"> ArticleStartDate,Date;Countcomments,lookup;PageURL,lookup </property>