I currently have a list which contains a text field for comments, versioning is enabled and the comments field is set to "Append Changes to Existing Text", so that we can capture and maintain multiple comments from multiple users.

I'm now attempting to use a CQWP to output specific items to end users. However, if the item comment field has more than one comment nothing is displayed. I'm using the following xslt to output comments:

<xsl:value-of select="@Comments" disable-output-escaping="yes"/>

How do I output all comment versions for each list item?



To achieve the output of all comment versions I found a solution on Marc D Anderson's Blog. In order to get this to work I had to switch from using a CQWP to a DVWP, but this wasn't a struggle.

For those looking for a quick copy and paste the following was used within the xslt:

<SharePoint:AppendOnlyHistory FieldName="Comments" runat="server" ControlMode="Display" ItemId="{@ID}"/>

Your Answer

