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

Question

Question

How to send one email that includes retrieved field data from multiple entries?

asked on February 27, 2015

This is probably easy but I can't come up with a way to accomplish it. I'm sure I am thinking too hard.

I have a Workflow that conducts a Laserfiche Search. I need to send a user a single email that contains specific fields from each of the entries returned in the Search.

Example Email body:

Search Results:

Doe, John - 322156

Smith, David - 254377

Jones, Mike - 312886

 

The above sample would be constructed using tokens from the Search Results (last name, first name - ID Number) but I can't figure out how to get all of that in one email. As it is now, the user I am sending the email to gets 3 different emails (using the sample results shown above).

 

What are my options for a single email?

 

As always, thanks in advance!

Eric

 

1 0

Answer

SELECTED ANSWER
replied on February 27, 2015 Show version history

Hi Eric. Looks like today you will learn just how useful the Assign Token Values activity is, in both of your posts =)

 

For this one we can use Assign Token Values to create a "list" with your results:

 

The first Assign Token Values activity creates an empty multi-value token. We use this to store the values you acquire from the Repository Search, using the For Each Entry to go through the results one by one. Think of it like pulling out a blank sheet of lined paper that we will then jot down our results in. 

 

The second Assign Token Values activity (inside the For Each Entry) will then append each entry's result into the multi-value token:

 

 

You can then "join" the values together with a newline in your email body using the token editor:

10 0

Replies

replied on March 7, 2015 Show version history

I know your question already been answered, however I want to add that if you want to send it by email (the list in the email body), perhaps you can try using HTML to make the result look nice in a table where you can have full control of the format: color, column size,.....

 

So try inserting HTML tags in to the multi value token - for example:

 

<tr><td>%(ForEachEntry_CurrentEntry_Name)</td>%(ForEachEntry_CurrentEntry_ID)</td></tr>

 

Please note that you will need to edit your token to:

1) Change "Apply Index: All values separated by: "Line Break" to "Space"

2) Apply Formatting "" to "HTML"

3) Optional: Perhaps you can select Apply Function: sort ascending

 

Assuming your token named "results", so in the email body you will need to:

[..... Anything you want to type here]

 

<table border="1"><tr><th>Name</th><th>ID</th></tr>%(results#@SortAscending@##[ ]##"HTML"#)</table>

 

 [..... Anything you want to type here]

 

 

 

 

 

 

4 0
replied on March 5, 2021

This was a super helpful, easy to read and apply post.  I have a query to check our forms SQL database for suspended business processes.  The goal was to create a workflow to automatically run the query daily, and if there are any suspended processes send our internal team an email listing them.  When there are multiple suspended processes, I kept struggling to have more than just the first record sent until I found this post.  Now when where are suspended processes, a well formatted (with a table) email of all suspended processes is sent to our team daily.  Learned a lot in applying the knowledge found here to our use case - many thanks to all for taking the time to share.

Best regards,

Jeff

1 0
replied on February 27, 2015

You can go through the search results and build a multi-value token with a value for each result. Then you can put the multi-value token in your email (and format it to show all values delimited by a line break).

0 0
replied on February 27, 2015

This worked perfectly!! Exactlay what I needed to do.

Thank you Maruna and Flavio!

0 0
replied on March 7, 2015

Thanks Ali. 

I already have the email loaded up with HTML!

Looks good. Thanks for the tips!

 

Eric

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

Sign in to reply to this post.