<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to create a HTML-Table in Email with input of Database query in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351057#M117785</link>
    <description>Thankyou very much, it worked for me.&lt;BR /&gt;Can you please show me how to format it like a table?with border line?</description>
    <pubDate>Tue, 29 May 2018 08:40:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-05-29T08:40:39Z</dc:date>
    <item>
      <title>how to create a HTML-Table in Email with input of Database query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351055#M117783</link>
      <description>&lt;P&gt;i have a query on a Database which give me Infomation like this:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://i.stack.imgur.com/W8kBt.png" target="_blank" rel="nofollow noreferrer noopener noreferrer"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEvv.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158028iB441BAAC75A3E979/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEvv.png" alt="0683p000009MEvv.png" /&gt;&lt;/span&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;i want to create a HTML Table with Information of the query above and send it to Email of Developer as Error Notification. Can you help me with the HTML code?. Thankyou alot!&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 18:30:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351055#M117783</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-28T18:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a HTML-Table in Email with input of Database query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351056#M117784</link>
      <description>&lt;P&gt;As a strating point you case copy/paste the following piece of Java code into a tJavaRow connected to to your data flow (for ex. tOracleInpput--&amp;gt;tJavaRow).&lt;/P&gt;&lt;PRE&gt;String msg = ((String)globalMap.getOrDefault("mailMessage", "&amp;lt;TABLE border=0 cellspacing=1px&amp;gt;" + "&amp;lt;TR&amp;gt;&amp;lt;TD&amp;gt;ID&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Error&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Date&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;"));
msg = msg + "&amp;lt;TR&amp;gt;&amp;lt;TD&amp;gt;" + row1.ID + "&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;" + row1.Error + "&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;" + row1.Date + "&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;"
globalMap.put("mailMessage", msg);&lt;/PRE&gt;&lt;P&gt;When the subjob is finish (onSubjobOK), a tSendMail will send the email using the content of the global variable "mailMessage" as as the message using the following syntax:&lt;/P&gt;&lt;PRE&gt;((String)globalMap.get("mailMessage"))&lt;/PRE&gt;&lt;P&gt;You can enrich the table with colors and so on.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 19:00:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351056#M117784</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-05-28T19:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a HTML-Table in Email with input of Database query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351057#M117785</link>
      <description>Thankyou very much, it worked for me.&lt;BR /&gt;Can you please show me how to format it like a table?with border line?</description>
      <pubDate>Tue, 29 May 2018 08:40:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351057#M117785</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-29T08:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a HTML-Table in Email with input of Database query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351058#M117786</link>
      <description>&lt;P&gt;Great!&lt;/P&gt;
&lt;P&gt;For the rest, this is a HTML question, not a Talend one.&lt;/P&gt;
&lt;P&gt;However, have a look at "TABLE border" parameter.&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 08:49:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351058#M117786</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-05-29T08:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a HTML-Table in Email with input of Database query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351059#M117787</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I Tried to to develop a job through talend using the below java code.&amp;nbsp; But i face the below issues&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SnipImage.JPG" style="width: 484px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M2Mn.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154313i3C03DAD33EC2A1B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M2Mn.jpg" alt="0683p000009M2Mn.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 669px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M2Y9.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148414iDC010F99B2E3AF65/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M2Y9.png" alt="0683p000009M2Y9.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Can you please help me to know the configuration of&amp;nbsp; tJavaRow and tSendMail&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jan 2019 08:24:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351059#M117787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-29T08:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a HTML-Table in Email with input of Database query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351060#M117788</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LPDLAA4"&gt;@SwatiShashwati&lt;/A&gt;&amp;nbsp;in the original post the second line in the code&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;msg = msg + "&amp;lt;TR&amp;gt;&amp;lt;TD&amp;gt;" + row1.ID + "&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;" + row1.Error + "&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;" + row1.Date + "&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;"&lt;/PRE&gt; 
&lt;P&gt;is missing an ';'&amp;nbsp; at the end. to complete the Java statement.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;As an aside I'm wondering why&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&amp;nbsp; you didn't use a tJavaFlex component so the this would then become something like this ( note not tested directly )&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Start Code&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt; 
&lt;PRE&gt;String msg = ((String)globalMap.getOrDefault("mailMessage", "&amp;lt;TABLE border=0 cellspacing=1px&amp;gt;" + "&amp;lt;TR&amp;gt;&amp;lt;TD&amp;gt;ID&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Error&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Date&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;"));&lt;/PRE&gt; 
&lt;P&gt;&lt;STRONG&gt;Main Code&lt;/STRONG&gt;&lt;/P&gt; 
&lt;PRE&gt;msg = msg + "&amp;lt;TR&amp;gt;&amp;lt;TD&amp;gt;" + row1.ID + "&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;" + row1.Error + "&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;" + row1.Date + "&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;";&lt;/PRE&gt; 
&lt;P&gt;(note additional ';' at end )&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;End Code&lt;/STRONG&gt;&lt;/P&gt; 
&lt;PRE&gt;globalMap.put("mailMessage", msg);&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Jan 2020 22:45:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351060#M117788</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-07T22:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a HTML-Table in Email with input of Database query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351061#M117789</link>
      <description>&lt;P&gt;Hi Sir,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Can you help me to reset or clear the table for every iterate?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tDBInput row1 (main) -&amp;gt; tFlowIterate -&amp;gt; tDBInput row2 (main) -&amp;gt; tJavaRow1 - &amp;gt;tsendMail&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My problem is the datatable in email are embedded from the previous data.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Itry to put msg =""; in javarow code but I get the same output.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;String msg = "";&lt;BR /&gt;msg =((String)globalMap.getOrDefault("mailMessage", "&amp;lt;TABLE border=1 cellspacing=1px&amp;gt;" + "&amp;lt;TR&amp;gt;&amp;lt;TD&amp;gt;EMPLOYEE_NO&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;EMPLOYEE_NAME&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;EVENT&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;DATE&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;TIME&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;VOID_LINK&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;"));&lt;BR /&gt;msg = msg + "&amp;lt;TR&amp;gt;&amp;lt;TD&amp;gt;" + row1.EMPLOYEE_NUMBER + "&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;" + row1.EMPLOYEE_NAME + "&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;" + row1.EVENT + "&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;" + row1.DATE_TRANS + "&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;" + row1.TIME + "&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;" + row1.VOIDLINK + "&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;";&lt;BR /&gt;globalMap.put("mailMessage", msg);&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LyJ4"&gt;flow.PNG&lt;/A&gt;</description>
      <pubDate>Tue, 21 Apr 2020 11:47:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351061#M117789</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-21T11:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a HTML-Table in Email with input of Database query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351062#M117790</link>
      <description>&lt;P&gt;Because your setting the value into the&amp;nbsp;&lt;SPAN&gt;globalMap - it will persist across iterations. If you don't want this you might have &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1) use the index of the iteration in the name of the field ( i.e. "mailMessage_" + index ) or&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2) store an arraylist in the&amp;nbsp;globalMap, and use the index of iteration to retrieve the correct value for the current iteration. This will depend on how many iterations you are running - maybe bad idea if doing lots. or&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3)&amp;nbsp;&lt;/SPAN&gt;issue here is that you probably should just construct your string in&amp;nbsp;&lt;SPAN&gt;tJavaRow1&amp;nbsp;and just save it to =&amp;gt; globalMap.put("mailMessage", msg) i.e. don't do a globalMap.getOrDefault as this will return the value created via the first iteration for every subsequent iteration. You don't need it. just construct new string and&amp;nbsp;globalMap.put it - every iteration will overwrite the previous.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps.....&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 13:59:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-create-a-HTML-Table-in-Email-with-input-of-Database-query/m-p/2351062#M117790</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-20T13:59:20Z</dc:date>
    </item>
  </channel>
</rss>

