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

Question

Question

Multi-Row SQL Custom Query to Multi-Value

asked on July 17, 2014 Show version history

I have a custom query that returns 20 rows. The query is a random-prize drawing that will return random results each time it is run. I need to convert the data in in row on a specific column to a multi-valued token. I am trying to use the For Each Row activity in Workflow to help me accomplish this. However, I can seem how to figure out the Assign Token Value activity to create and add a new value each time the activity loops for each query value returned. Any ideas or help would be great! Thank You.

 

Random Prize Workflow.jpg
0 0

Replies

replied on July 17, 2014 Show version history

Did you try the answer presented here.

Looking at your workflow, the issue may be that you are not creating the token before you update it. You'll want to create the tokens first (outside the loop), then update them inside it.

0 0
replied on July 17, 2014

Are you creating the token inside the Assign Token Value activity that is within the loop? That might be the issue then. You'll want to Create the token with an empty value outside of the loop and then Modify it inside the loop. You might very well be creating a new token and overwriting the old one every time through the loop.

 

replied on July 18, 2014

I believe you need to configure the tokens outside the loop to get it to work. make sure not to use the same token for each branch, as they will overlap and cause issues. 

 

Have you managed to resolve this?

 

 

0 0
replied on July 23, 2014

Thanks Matt and Kenneth for your assistance and examples. We were able to accomplish what we needed done in Workflow. The only thing I would like to improve is having all age group results in one single e-mail. Right now I have the three e-mails set up based on the Age token in the For Each Loop which e-mails the random prize winner for each age group. If you have any ideas how to have all of this information from the Assign Token activities into a single e-mail, please feel free to share! I have included a visual example of how the workflow is currently set up. Thank you again!

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

Sign in to reply to this post.