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

Question

Question

assign Email Task recipient based on prior approvals

asked on September 26, 2019

I want to set the recipient of an email task to be the person who approved the instance in a prior process step?  I understand adding a check box and email to an approval step would work but, seems primitive.  I'd rather look it up in a data set and send the email based on a variable.

0 0

Answer

SELECTED ANSWER
replied on September 26, 2019

Beth, at the tasks you want to use the email address from, create a new form to be used for those tasks that captures the assigners email address. You can then reference that email address in the email task you mention.

1 0
replied on September 27, 2019 Show version history

I think you meant "create a new FIELD to be used". Keep adding the approver email addresses to a hidden field and use that variable in the email service task. 

6.2.5
0 0
replied on September 27, 2019

No, I meant new form. If you use a default variable in a field, once it's populated it doesn't get over written, so you would only want it once the instance gets to that task.

1 0
replied on September 27, 2019 Show version history

They do need to be different fields/variables on the different forms. So on the first form, you would have an email field named email1 which defaults to the current user's email address. On the second form, you would have an email field named email2 which defaults to the current user's email address. And so on. Then when you get to the email, put in email1, email2, and so on. I would also hide those email addresses as it does make it a bit nicer looking and keeps them from as easily changing the value of the field.

1 0

Replies

replied on September 26, 2019

You can do that by using a workflow service task that would pick up the items. However, you should be able to use the same variable used to select the individual at the previous step in the later step as well.

0 0
replied on September 26, 2019

The business process is not that simple.  there are various paths and approval branches that could have been taken to get to the point where a notification is necessary.  Ideally, I could query the actual approver and email that person.  In this particular business process it could be 1 approver or up to 4.  

0 0
replied on September 27, 2019

So what it sounds like is that you want to record who approved it after they approved it and then go back to that list later? If so, I think having a workflow service task to record who approved it and a separate workflow service task to read it back before sending out the email makes the most sense in some cases. It would take some work configuring things right, but could be done. In other cases, if the email address is already stored in Forms variables, it would be much easier to send to those. That could be handled with separate hidden fields that fills the email address of the participant using a default value. Then it is just using those variables in the email and testing.

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

Sign in to reply to this post.