Hi,
Is it possible to dump all the rows returned from a custom sql query to a single token which could be used to later populate say a field on a pdf or a word file ?
Struggling to capture all the rows into one comment.
Thanks
Hi,
Is it possible to dump all the rows returned from a custom sql query to a single token which could be used to later populate say a field on a pdf or a word file ?
Struggling to capture all the rows into one comment.
Thanks
After your SQL query, use a For Each Row activity to append to a multi-value token.
I have tried that, created blank token prior to the for each row activity, used append and right after the for each i guess the token gets overwritten by the last or the first row of the query. I have not tried filling out pdf inside the for each row activity. In the Email you see I only see one row data in the token.
The 3 tokens you create need to be multi-value tokens. It looks like you didn't check that box when you created them. Then you want to set your action inside the For Each Row loop to append.
Done all that, here are the screenshots i appreciate what i might be missing here ? The email i receive after the loop has only one row of the value, although query returns 4 rows.
Your tokens aren't formatted to return multiple values (in the email). Check "Apply Index," "All Values Separated By."
Thanks, now will have to figure out how to make sure how to map each of the three different tokens to each other. Example if 3 results from sql with 3 column values need to be arranged so row 1 of the token corresponds to the first row of sql query with each column listed under each other.
Example if i am getting this results from custom query (3 rows and 3 column values):
Row 1: A1, A2, A3
Row 2: B1, B2, B3
Row 3 : C1, C2, C3
Trying to get one single token or formatting at end of it all such that it looks like:
A1
A2
A3
B1
B2
B3
C1
C2
C3
Oh nvm figured it out to get it to that format, instead of three tokens i ended up using one token only in the foreach row activity :).