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

Question

Question

Using a variable for a User task email message

asked on March 14, 2016

I have multiple user tasks that are the output of an exclusive gateway, used to assign the task to the correct team. Each of these user tasks sends the same email message notifying the team they have a task. I'm looking for a way to store the HTML email message in a variable and use that variable as the message body for all of the User task assignments. This would make creating the assignment tasks simpler as it would be one less thing to customize for each task, and more importantly, make changing the email message something that would happen in only one place and apply to all user assignment email referencing that variable.

I tried putting the HTML in a Single Line hidden variable as the default, and then inserting that variable in the HTML message body, but no luck (An unexpected error has occurred. [LFF502-UnexpectedError]).

I was able to use the variable in the "Visual" editor and it displays the message in the email, but does not resolve variables referenced with the message. (Guess that's problem #2.)

Is there any way to reuse HTML message text containing variables?

0 0

Replies

replied on March 15, 2016

Hi Geoffrey,

As Abby mentioned, Forms doesn't allow you to submit HTML in a field which is why you can't store it in the single line hidden field. However, you can leverage a workflow like Ken suggests to send that HTML content back to Forms instead of emailing it out.

While you can't submit HTML, you can have a short helper workflow use the "Set Business Process Variables" task to insert your email content into a variable after the form is submitted. This means that you could have a hidden single line field that stays empty on the form, but Workflow will fill in that variable after submission. Your user tasks can then use that process variable instead of you having to recreate the email each time. Hope this helps!

1 0
replied on March 15, 2016

Thanks Anita, that's so close to working, but suffers from "Problem 2" above, where any form variables contain in the text variable I've set with workflow are not being evaluated. So I've got the HTML working, but now I end up with a nice HTML message that looks like this:

A new 1041 tax form for account {/dataset/Account_Number} has been submitted.

 

0 0
replied on March 15, 2016

Hi Geoffrey,

You could use "Retrieve Business Process Variables" from the initial form so that those variables can be parsed within the workflow as well. This will allow you to use the Forms inputs as tokens in your workflow instead of having Forms try to fill in variables back in the user task.

1 0
replied on March 15, 2016

That works, thanks!

0 0
replied on March 15, 2016

Would this be easier in a Workflow: pass the recipients to Workflow, then have WF send out the email -- you would only need to have the email in one place that way.

Ken

0 0
replied on March 15, 2016

Thanks for the idea. I wish I could use workflow this way with Forms, but as soon as you need Team/Role functionality it seems you have no choice but to live exclusively in Forms, and even further, do everything in a User Task because that's the only place team/role filtering will work. There's no way for me to retrieve the recipient list to pass to workflow since the email effectively goes to users assigned a particular role, and that role->user functionality isn't exposed.

Ideally I'd love to pass Team/Role objects to workflow, and also be able to use those objects in JavaScript in Forms, but I don't think there's any way to do that right now. I hope Laserfiche is working on expanding the scope of those objects - even allowing team/role filtering to work in an Email Task in Forms would be really helpful.

1 0
replied on March 15, 2016

Forms does not take HTML element as field value in form submission.

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

Sign in to reply to this post.