<?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 How to add a customized table in sending email with html/java code? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-customized-table-in-sending-email-with-html-java/m-p/2314132#M142526</link>
    <description>&lt;P&gt;Hi, I'm facing a problem with creating a customized table in the email part of my data alert. I want to get the row counts of two tables in different servers and generate a table basically looks like the picture below. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p00000C7s5jAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152076iF0185568C97E0750/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p00000C7s5jAAB.png" alt="0693p00000C7s5jAAB.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But I only received an email with a bunch of code in my email: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;style type="text/css"&amp;gt;.TFtable{width:100%; border-collapse:collapse; }.TFtable td{ padding:7px; border:# 4e95f4 1px solid; width:10%; text-align: center;}.TFtable tr{ background:# b8d1f3; width:100%; }.TFtable tr:nth-child(odd){ background: # FFFF;}.TFtable tr:nth-child(even){ background: # 8080ff; }.TFtable th{background: # 00001a;width:15%; text-align: center; padding;25%; color: white;}&amp;lt;/style&amp;gt;&amp;lt;/HEAD&amp;gt;&amp;lt;BODY&amp;gt;&amp;lt;h3 style='text-align:center;'&amp;gt;Table&amp;lt;/h3&amp;gt;&amp;lt;table class="TFtable"&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Table1&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Count1&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Table2&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Count2&amp;lt;/th&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;abc&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;123&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;def&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;456&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data pipeline looks like this: &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p00000C7s8SAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130663iEF8A6341B699D015/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p00000C7s8SAAR.png" alt="0693p00000C7s8SAAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code in tJava_1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;globalMap.put("v_DetailedReport" , globalMap.get("v_DetailedReport").toString()+&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;style type="text/css"&amp;gt;.TFtable{width:100%; border-collapse:collapse; }.TFtable td{ padding:7px; border:# 4e95f4 1px solid; width:10%; text-align: center;}.TFtable tr{ background:# b8d1f3; width:100%; }.TFtable tr:nth-child(odd){ background: # FFFF;}.TFtable tr:nth-child(even){ background: # 8080ff; }.TFtable th{background: # 00001a;width:15%; text-align: center; padding;25%; color: white;}&amp;lt;/style&amp;gt;&amp;lt;/HEAD&amp;gt;&amp;lt;BODY&amp;gt;&amp;lt;h3 style='text-align:center;'&amp;gt;Table&amp;lt;/h3&amp;gt;&amp;lt;table class="TFtable"&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Table1&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Count1&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Table2&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Count2&amp;lt;/th&amp;gt;&amp;lt;tr&amp;gt;&lt;/P&gt;"&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tJava_2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;globalMap.put("v_DetailedReport" , globalMap.get("v_DetailedReport").toString()&lt;/P&gt;&lt;P&gt;+"&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;"+globalMap.get("A").toString()&lt;/P&gt;&lt;P&gt;+"&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;"+globalMap.get("B").toString()&lt;/P&gt;&lt;P&gt;+"&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;"+globalMap.get("C").toString()&lt;/P&gt;&lt;P&gt;+"&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;"+globalMap.get("D").toString()&lt;/P&gt;&lt;P&gt;+"&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tJava_3: &lt;/P&gt;&lt;P&gt;globalMap.put("v_DetailedReport" , &lt;/P&gt;&lt;P&gt;globalMap.get("v_DetailedReport").toString()+"&amp;lt;/table&amp;gt;");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: A,B,C,D are the columns generated by the db input. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone can help to debug this? Not sure the code doesn't map to a table. Thank you! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 00:26:34 GMT</pubDate>
    <dc:creator>stellayou33</dc:creator>
    <dc:date>2024-11-16T00:26:34Z</dc:date>
    <item>
      <title>How to add a customized table in sending email with html/java code?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-customized-table-in-sending-email-with-html-java/m-p/2314132#M142526</link>
      <description>&lt;P&gt;Hi, I'm facing a problem with creating a customized table in the email part of my data alert. I want to get the row counts of two tables in different servers and generate a table basically looks like the picture below. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p00000C7s5jAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152076iF0185568C97E0750/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p00000C7s5jAAB.png" alt="0693p00000C7s5jAAB.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But I only received an email with a bunch of code in my email: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;style type="text/css"&amp;gt;.TFtable{width:100%; border-collapse:collapse; }.TFtable td{ padding:7px; border:# 4e95f4 1px solid; width:10%; text-align: center;}.TFtable tr{ background:# b8d1f3; width:100%; }.TFtable tr:nth-child(odd){ background: # FFFF;}.TFtable tr:nth-child(even){ background: # 8080ff; }.TFtable th{background: # 00001a;width:15%; text-align: center; padding;25%; color: white;}&amp;lt;/style&amp;gt;&amp;lt;/HEAD&amp;gt;&amp;lt;BODY&amp;gt;&amp;lt;h3 style='text-align:center;'&amp;gt;Table&amp;lt;/h3&amp;gt;&amp;lt;table class="TFtable"&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Table1&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Count1&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Table2&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Count2&amp;lt;/th&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;abc&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;123&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;def&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;456&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data pipeline looks like this: &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p00000C7s8SAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130663iEF8A6341B699D015/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p00000C7s8SAAR.png" alt="0693p00000C7s8SAAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code in tJava_1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;globalMap.put("v_DetailedReport" , globalMap.get("v_DetailedReport").toString()+&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;style type="text/css"&amp;gt;.TFtable{width:100%; border-collapse:collapse; }.TFtable td{ padding:7px; border:# 4e95f4 1px solid; width:10%; text-align: center;}.TFtable tr{ background:# b8d1f3; width:100%; }.TFtable tr:nth-child(odd){ background: # FFFF;}.TFtable tr:nth-child(even){ background: # 8080ff; }.TFtable th{background: # 00001a;width:15%; text-align: center; padding;25%; color: white;}&amp;lt;/style&amp;gt;&amp;lt;/HEAD&amp;gt;&amp;lt;BODY&amp;gt;&amp;lt;h3 style='text-align:center;'&amp;gt;Table&amp;lt;/h3&amp;gt;&amp;lt;table class="TFtable"&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Table1&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Count1&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Table2&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Count2&amp;lt;/th&amp;gt;&amp;lt;tr&amp;gt;&lt;/P&gt;"&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tJava_2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;globalMap.put("v_DetailedReport" , globalMap.get("v_DetailedReport").toString()&lt;/P&gt;&lt;P&gt;+"&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;"+globalMap.get("A").toString()&lt;/P&gt;&lt;P&gt;+"&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;"+globalMap.get("B").toString()&lt;/P&gt;&lt;P&gt;+"&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;"+globalMap.get("C").toString()&lt;/P&gt;&lt;P&gt;+"&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;"+globalMap.get("D").toString()&lt;/P&gt;&lt;P&gt;+"&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tJava_3: &lt;/P&gt;&lt;P&gt;globalMap.put("v_DetailedReport" , &lt;/P&gt;&lt;P&gt;globalMap.get("v_DetailedReport").toString()+"&amp;lt;/table&amp;gt;");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: A,B,C,D are the columns generated by the db input. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone can help to debug this? Not sure the code doesn't map to a table. Thank you! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:26:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-customized-table-in-sending-email-with-html-java/m-p/2314132#M142526</guid>
      <dc:creator>stellayou33</dc:creator>
      <dc:date>2024-11-16T00:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a customized table in sending email with html/java code?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-customized-table-in-sending-email-with-html-java/m-p/2314133#M142527</link>
      <description>&lt;P&gt;Hi @Xiaoshan You​,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the Resulting HTML code you sent, this is what you can expect to get in your email:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p00000C7zKaAAJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142118i9253DE9617A65F1B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p00000C7zKaAAJ.png" alt="0693p00000C7zKaAAJ.png" /&gt;&lt;/span&gt;To validate the html you have a lot of options I just used https://www.w3schools.com/html/tryit.asp?filename=tryhtml_default&lt;/P&gt;&lt;P&gt;And on your tSendMail got to Advanced Settings and change it from Plan Text to HTML&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p00000C7zMqAAJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152738i000104177AD220E6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p00000C7zMqAAJ.png" alt="0693p00000C7zMqAAJ.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that helps you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 16:16:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-customized-table-in-sending-email-with-html-java/m-p/2314133#M142527</guid>
      <dc:creator>Alaor_Silva</dc:creator>
      <dc:date>2021-03-15T16:16:43Z</dc:date>
    </item>
  </channel>
</rss>

