Create a summary field of comments entered when record is edited multiple times

This example will create a summary field to keep track of comments past users have entered. You will need to add a text field (read-only optional) to your form. To utilize the below code, you will name the summary text field summary and have a text field called comment.

ON('save-record', function(event){
  var name = USERFULLNAME();
  var time = TIMESTAMP();
    var temp = $summary;
    SETVALUE('summary', temp + CONCAT(name, ' at ', time, ' : ', $comment, '\n'));
    SETVALUE('summary', CONCAT(name, ' at ', time, ' : ', $comment, '\n'));