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

Question

Question

Creating a list of found items in an Email

asked on April 24, 2015 Show version history

I am trying to write a workflow that will search a set of subfolders and list them (as an example), basically a list of everything that meets a certain condition (i.e. for each result from a Search Repository or Find Items task).  I did find this post here, and it started me in the right direction, however I don't think I'm quite there...

What I've done to this point is do a search on our test repository for folders, and for each one it finds, append it to a multi-value token (my Assign Token Values task in the attached image).  Using the Track Tokens task, I can see that each iteration through the loop adds the folder name (CurrentEntry) for that loop to the token value, but I can't tell if it updated the single value, or appended a new value?  

At the end of this loop, I did up a test Email to send out this list of all values, however it only sends out the last folder value, which tells me the token is getting overwritten each time I'm stepping through the loop, not appending the value as a new value to the multi-value token.  

Is there something I need to do to ensure a located value is appended as an additional list item in a multi-value token, as opposed to overwriting the single existing value in the token?  (I thought maybe the Append List Field Choices might do this, but this is based more off of an actual Laserfiche field, not a token.)

Thanks, in advance, to anyone who can help - I could see myself using this in a ton of different places!

Marty Gaffney - Network Technician

Town of Okotoks

file.jpg
file.jpg (13.35 KB)
0 0

Answer

SELECTED ANSWER
replied on April 24, 2015 Show version history

If you want to know a bit more about what exactly Alex is doing above, you can right click on your token (that is, right click on %(Original List) in your email body) and select "Token Editor". You will then see a window pop up. You can select the following to make your multi-value token appear as all its values joined together, one in each line:

 

If you hit OK, you will end up with what Alex has above. You can also use this to further customize what your token will look like (for example, maybe you want to separate values by spaces or semicolons instead of line breaks). The default, with Apply Index checked off, is to display only the first value of a multi-value token.

 

You can also edit the token from inside the email editor, under the "Tokens" button in there; this has the same effect.

 

0 0

Replies

replied on April 24, 2015

Create the token before you go into the For Each loop. Then append in the loop. Your current setup is basically re-creating the token for every iteration.

1 0
replied on April 24, 2015

So I moved the original token creation outside of the loop, made a copy of it into the loop, and set it to take the assigned "Original List" token value, and append the current entry name (folder name) as a new list item.  Looking at the results, I can see the multi-value token building the list correctly with each iteration, however when I try to reference the token in an Email message, it still only shows the first item in the list.

Is there a different way I should be referencing the token from the Email message?  It only appears I can reference the one token, whether the original or with appended values.

Configure Token.jpg
Email Message.jpg
0 0
replied on April 24, 2015

Since your token is multivalue, try using

%(Original List#[]#)

in the e-mail

1 0
SELECTED ANSWER
replied on April 24, 2015 Show version history

If you want to know a bit more about what exactly Alex is doing above, you can right click on your token (that is, right click on %(Original List) in your email body) and select "Token Editor". You will then see a window pop up. You can select the following to make your multi-value token appear as all its values joined together, one in each line:

 

If you hit OK, you will end up with what Alex has above. You can also use this to further customize what your token will look like (for example, maybe you want to separate values by spaces or semicolons instead of line breaks). The default, with Apply Index checked off, is to display only the first value of a multi-value token.

 

You can also edit the token from inside the email editor, under the "Tokens" button in there; this has the same effect.

 

0 0
replied on April 24, 2015

I had absolutely no idea that Token Editor existed within an Email message, that's fantastic - I'll be using this one regularly!

Thanks much!

Marty

0 0
replied on April 24, 2015

It actually exists anywhere in workflow where there is a token, so long as it's text... which means almost everywhere. Token menus also have a "Token Dialog" which is basically an extended version of this.

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

Sign in to reply to this post.