Skip to Content

Converting discussion into text

  • Origin: Calculated attribute

In order to convert all the comments in the discussions tab of an item to a separate text field (for instance, to use for export), enter the following expression:


@prefix cmw: <>.

@prefix comment: <>.

@prefix sort: <>.

@prefix string: <>.





    ?item comment:commentsTopTreeWithChildren ?comment.

    ?comment comment:date ?date.

    ?comment comment:authorName ?authorName.

    ?comment comment:value ?commentValue.

    ("Date: {0} Author: {1} Text: {2}\r\n" ?date ?authorName ?commentValue) string:format ?commentText.

  } select ?commentText -> ?commentsTexts.

  ?commentsTexts string:concatenation ?value.