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

Question

Question

Forms collection into workflow merge field

asked on April 17, 2019

Hi,

I have a form containing a collection of mailing addresses.  I would like to create a set of address labels with all of the addresses in the collection.  I have looked at using Update Word Document tool in Workflow to update mailing list. Do I have to write the collection contents to a temporary table to do this or can I use some other method?

If it is possible directly from Forms that would be fine.

Thanks.

0 0

Replies

replied on April 18, 2019

WF reads a collection in forms as an array to begin with, so you should be able to do this with a simple for each row task in WF.  Update (or create a new) word document within that task.  Should work fine.

1 0
replied on April 18, 2019

Thanks for this. If I understand your solution I would have to have uniquely named fields for each label so:

<<Name1>> <<Addr1>  <<Name2>> <<Addr2>>  <<Name3>> <<Addr3>>

<<Name4>> <<Addr4>  <<Name5>> <<Addr5>>  <<Name6>> <<Addr6>>

<<Name7>> <<Addr7>  <<Name8>> <<Addr8>>  <<Name9>> <<Addr9>>

 

Thanks!

0 0
replied on April 18, 2019

Close, each part of the collection will be a named part of the collection so:

AddressCollection.name

AddressCollection.address1

etc.

The values will be based on the iteration so the variable you will use for the word document word be %(ForEachRow_Name), etc.  The iteration of the For Each Row task will correspond to the entry order in the collection on the form.  Note that in the properties of the For Each Row task, you have to select the collection name.  Hopefully it goes without saying that you before all of this, you do have to have a Retrieve Laserfiche Forms Content task where you bring in the collection to WF.

0 0
replied on April 18, 2019

That's not necessary. Tables expose a token for the whole table in Retrieve Business Process Variables. You can then use that directly into the Table Merge of Update Word Doc.

For ex, my Forms process has a table (called "Table") with 2 columns ("Column 1" and "Column 2"). In Retrieve Business Process Variables, I picked the table:

Then in Update Word Document, the table is available in the "activity" section and the columns are in the list of values:

If you use TableStart tags in your Word document, each row will be replicated as a separate entity. It does not have to be rendered as a table, it will just follow the format and insert each row as a separate block.

This will result in separate address blocks.

1 0
replied on April 19, 2019

Thanks to all of you. This has given me a lot to chew on.

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

Sign in to reply to this post.