You are viewing limited content. For full access, please sign in.

Question

Question

Passing Comments To Next Steps in Forms

asked on May 31, 2023

Hello,

I have a process with multiple approval steps.  I would like to capture the comments (from the default comment box) from each step and include them in the email notification for the next user.

So if there are three approval steps, the second approver would see the comments of the first (which works fine), the third approver would see the comments from the previous two, and a final email notification to the initiator would include the comments from all three. 

How can this be done?  The list of "insert variables" in the Email Service Task doesn't appear to provide the options for anything put the previous user which would be the last approver.

Perhaps there is a way to include the Action History which contains all the comments?

0 0

Replies

replied on June 5, 2023

I do this on-screen in one of my processes. This method will compile all the previous comments into a single multi-line field (one at a time; each time a form with this code is launched, it takes the most recent comments and appends them to the older comments (that were already written to the field)). I want to be clear that I got help through Answers with making this work way back when, so this isn't my original work, but I couldn't say now who helped me at the time. 

I hope this helps!

$(document).ready(function () {
	  var com = $('#q85 textarea').val();
	//get previous comment
	  var com2 = $('#q87 textarea')[0].getAttribute('default-val');
	//get previous action participant
	  var displayname=$('#q89 input')[0].getAttribute('default-val');
	//get previous submission time
	  var submissiontime=$('#q88 input')[0].getAttribute('default-val');
	//get previous action
	  var action=$('#q86 input')[0].getAttribute('default-val');
	//combine the information together
	  var currentinfo=""; 
  		if(com2!=null){
          currentinfo=currentinfo+displayname+" at "+ submissiontime + ": "+ com2;
	      }	 

	//append to field that display the information
	if (currentinfo!=""){
	  com = com + '\n\n' + currentinfo;
	  $('#q85 textarea').val(com);   
	}
	  $('#q85 textarea').attr('readonly', 'True');
	});

 

previous_comment_fields.png
1 0
replied on June 1, 2023

Hi there,

You can check the task details page, there's a history tab on the right, where you can view past comments and activities.

Including action history in email notification is not supported yet. However, we have received several feature request about including it in email attachment and currently working on it. Stay tuned and we will let you know as soon as it released :)

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.