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

Question

Question

Query Results in Email Body

asked on November 5, 2020

This one is killing me!!!!

Everything works but the last email. 

I store vouchers by appropriation number in a DB - works fine.   There are about 15 vouchers in the DB with only 5 different Appropriation Numbers.

 I'm trying to get workflow to total the amount spent per Appropriation Number and then on a email show each Appropriation Number and the total  spent.   Email5 shows each individual Appropriation Number and the value of the Amount Spent - works fine.

 I can't get the Email7 to show all 5 Appropriation lines.  Please help!  Thanks John

Capture.JPG
Capture2.JPG
Capture3.JPG
Capture.JPG (25.62 KB)
Capture2.JPG (30.07 KB)
Capture3.JPG (31.95 KB)
0 0

Answer

SELECTED ANSWER
replied on November 5, 2020

You want to use the current value tokens in For Each Row when you're appending (otherwise the one from the Query Data activity itself is always the first row). In your email, you want to format your token as delimited by newline or commas to get all values.

In general, multi-value tokens entered into single-line text boxes will give you the first value because Workflow doesn't know if you wanted the one value or all and what you want your delimiter to be.

2 0

Replies

replied on November 5, 2020

Create an empty multivalue token at the beginning of the workflow, and instead of create select modify it to add each appropriation number with the option to "append to existing values".

2020-11-05_8-33-20.png
2020-11-05_8-32-55.png
1 0
replied on November 5, 2020 Show version history

So I think I tried that before but I did as you explained.  Same result only returns 1 line of data and not all 5.  I just don't know why its not displaying all 5 lines with amounts? 

 

 

Capture.JPG
Capture2.JPG
Capture3.JPG
Capture4.JPG
Capture.JPG (26.3 KB)
Capture2.JPG (56.27 KB)
Capture3.JPG (25.7 KB)
Capture4.JPG (23.76 KB)
0 0
SELECTED ANSWER
replied on November 5, 2020

You want to use the current value tokens in For Each Row when you're appending (otherwise the one from the Query Data activity itself is always the first row). In your email, you want to format your token as delimited by newline or commas to get all values.

In general, multi-value tokens entered into single-line text boxes will give you the first value because Workflow doesn't know if you wanted the one value or all and what you want your delimiter to be.

2 0
replied on November 5, 2020

Bingo!  Thanks Guys

Capture.JPG
Capture2.JPG
Capture.JPG (46.12 KB)
Capture2.JPG (66.5 KB)
0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.