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

Question

Question

[Forms and Workflow] How do I get an emitted email token (from an Update Word Document activity) to display in a forms HTML block?

asked on September 20 Show version history

Righteo, so here's an interesting challenge.. 

I'm trying to find a clean way to display a dynamic list of line items from a database look up in an HTML block within a Laserfiche form (without using a table or repeating item group).

What we've got so far is the first form submission triggering a workflow, which does a database query, returning data which is merged into a Word document template. Using the advanced "Emit Email Token" option, the output of this Word document can be used in the body of an email as HTML (and looks great) but I'm having trouble finding a way to get the HTML content of this token back into Laserfiche Forms.

When I use the "Update Business Process Variable" and add the email token (which is available to be selected) to a Rich Text Field (for the second, or subsequent tasks/forms), it just displays the file path to the emitted email token rather than the contents of the token.

Does anyone have some creative ideas on how to convert that special email token into HTML so that we can put into a Rich Text Field (and therefore use in an HTML block via dataset variable)? 

0 0

Replies

replied on September 21

@████████ would you happen to have any ideas or suggestions? smiley

0 0
replied on September 23

Hm, currently there is no way to pass the contents of a Word doc to Forms as HTML. You can only build your HTML manually in Workflow with either a script or tokens and pass that.

I'll add a feature request to see how doable it is (Word adds a lot of ...bloat to its HTML layer).

1 0
replied on September 23 Show version history

Thanks for adding that as a feature request. I absolutely know what you mean about Word's HTML bloat.. My line of thinking was purely from building upon existing approaches (like formatting an email) so that your average administrator can pull this off in a relatively low-code sort of way.

Workflow Data Query -> Update Word Document (table merge) -> Emit HTML Token -> Update Business Process Variables -> HTML Block

You mentioned scripting or tokens in your post, if it isn't too much trouble could you elaborate on how you could do something similar using Tokens to create a HTML table?

0 0
replied on September 23

It's no trouble because i did it as an exercise way back when and I never delete a workflow. But it's also not pretty.

I do know what you mean about the mail token being easy. It was easy for email since most people use Outlook and either Outlook knows how to deal with Word HTML bloat or the world of mail clients has learned to deal with it because Outlook does. Also emails are more forgiving when it comes to large-ish blobs of data being passed around. Passing it back to Forms is slightly more complicated since it could easily exceed size limits on the call back to Forms and we don't have a good way to say "if that happens, chop off the giant HTML chunk because I could live without it and try again".

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

Sign in to reply to this post.