<?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: Error on tMap expression in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Error-on-tMap-expression/m-p/2331545#M100519</link>
    <description>&lt;P&gt;First of all, you should never use "==" to compare 2 strings.&lt;/P&gt; 
&lt;P&gt;Use String.compareTo() or String.equals() instead.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Then you said that&amp;nbsp;&lt;SPAN&gt;when the column Terms_Of_Payment is "N120" the newColumn should show "120" but you never compare&amp;nbsp;Terms_Of_Payment with this value. Base on your extract, I think you want to compare to "NT120", not to "N120".&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Your expression should look like this:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;"NT120".equals(row3.TERMS_OF_PAYMENT)?"120":
	"NT90".equals(row3.TERMS_OF_PAYMENT)?"90":
		"NT75".equals(row3.TERMS_OF_PAYMENT)?"75":
			"NT60".equals(row3.TERMS_OF_PAYMENT)?"60":
				"NT30".equals(row3.TERMS_OF_PAYMENT)?"30":
					"GE69".equals(row3.TERMS_OF_PAYMENT)?"30":
						"GE37".equals(row3.TERMS_OF_PAYMENT)?"30":
							"NT45".equals(row3.TERMS_OF_PAYMENT)?"45":
								"NT00".equals(row3.TERMS_OF_PAYMENT)?"1":
									"ZFRE".equals(row3.TERMS_OF_PAYMENT)?"0":
										"NT15".equals(row3.TERMS_OF_PAYMENT)?"15":
											"Termo de pagamento não registrado"&lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN&gt;Try this one and let us know.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2019 08:39:28 GMT</pubDate>
    <dc:creator>TRF</dc:creator>
    <dc:date>2019-08-29T08:39:28Z</dc:date>
    <item>
      <title>Error on tMap expression</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-on-tMap-expression/m-p/2331544#M100518</link>
      <description>&lt;P&gt;Hello Guys,&lt;/P&gt; 
  &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
  &lt;P&gt;I'm new at Talend and a few days ago i started to migrate some jobs off the SSIS to the talend, and i face some issues when i try to replicate a kind off "derivate column" off the ssis.&lt;/P&gt; 
  &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
  &lt;P&gt;For this i'm using the tMap component and build expression, the expression is working without error mensagens, the expression is working in the "test" of the expression builder, but in the tLogRow or in my Output table the result it's not working corretely.&lt;/P&gt; 
  &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
  &lt;P&gt;I'm using this expression&lt;/P&gt;  
 &lt;BR /&gt;&lt;BR /&gt;To see the whole post, download it &lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009McoS" target="_blank"&gt;here&lt;/A&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:51:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-on-tMap-expression/m-p/2331544#M100518</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error on tMap expression</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-on-tMap-expression/m-p/2331545#M100519</link>
      <description>&lt;P&gt;First of all, you should never use "==" to compare 2 strings.&lt;/P&gt; 
&lt;P&gt;Use String.compareTo() or String.equals() instead.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Then you said that&amp;nbsp;&lt;SPAN&gt;when the column Terms_Of_Payment is "N120" the newColumn should show "120" but you never compare&amp;nbsp;Terms_Of_Payment with this value. Base on your extract, I think you want to compare to "NT120", not to "N120".&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Your expression should look like this:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;"NT120".equals(row3.TERMS_OF_PAYMENT)?"120":
	"NT90".equals(row3.TERMS_OF_PAYMENT)?"90":
		"NT75".equals(row3.TERMS_OF_PAYMENT)?"75":
			"NT60".equals(row3.TERMS_OF_PAYMENT)?"60":
				"NT30".equals(row3.TERMS_OF_PAYMENT)?"30":
					"GE69".equals(row3.TERMS_OF_PAYMENT)?"30":
						"GE37".equals(row3.TERMS_OF_PAYMENT)?"30":
							"NT45".equals(row3.TERMS_OF_PAYMENT)?"45":
								"NT00".equals(row3.TERMS_OF_PAYMENT)?"1":
									"ZFRE".equals(row3.TERMS_OF_PAYMENT)?"0":
										"NT15".equals(row3.TERMS_OF_PAYMENT)?"15":
											"Termo de pagamento não registrado"&lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN&gt;Try this one and let us know.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 08:39:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-on-tMap-expression/m-p/2331545#M100519</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-08-29T08:39:28Z</dc:date>
    </item>
  </channel>
</rss>

