Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
rubenfasilva
Contributor
Contributor

Send email with contents of excel file splitted by specific column

Hello my friends!

I would like yuor help for this issue:

I want to send an email with the content of excel file on the email body.

I have the input file with the following data:

url_image;inventory,warehouse_id;warehouse_email

http://product1.jpg;10;2;email2@warehouse_id.xpto

http://product1.jpg;7;1;email1@warehouse_id.xpto

http://product3.jpg;9;2;email2@warehouse_id.xpto

http://product2.jpg;5;1;email1@warehouse_id.xpto

Then I have a tJavaRow with the code to print that content and works fine:

context.MsgCode = "<table border=1 cellspacing=1 cellpadding=0><tr> <th>url_image</th><th>inventory</th><th>Warehouse_id</th><th>Warehouse_email</th></tr>";

context.TableRow = "</td><td><img src="+input_row.url_image +" height=100 width=100></img></td><td>"+input_row.inventory +"</td><td>"+input_row.warehouse_id +"</td><td>"+input_row.warehouse_email+"</td><td>"+input_row.STK_TOTAL+"</td></tr>" + context.TableRow;

context.MsgCode = context.MsgCode + context.TableRow+ "</table>";

Then the flow is:

Excel_inputfile -> TflowToIterate -> tfixedflowinput -> tsendemail

The email body is context.MsgCode and works fine

The issue is that the email is sending all the file content and one email per line....

What I need is to split the content by warehouse and send one email per warehouse_id

How can I split the content by warehouse_id and send their content into their email?

Thank you!

Labels (2)
1 Reply
rubenfasilva
Contributor
Contributor
Author

hello! Any help?

Thank you!