<?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: If then else expression in Tmap : ERROR in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249218#M33841</link>
    <description>&lt;P&gt;If it worked , please make this topic as resolved. It helps others.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Mar 2019 16:14:09 GMT</pubDate>
    <dc:creator>akumar2301</dc:creator>
    <dc:date>2019-03-15T16:14:09Z</dc:date>
    <item>
      <title>If then else expression in Tmap : ERROR</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249210#M33833</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've search this forum for 2 days to get the syntax for my variable down.&lt;/P&gt;
&lt;P&gt;When launching my job however, my tmap is in error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My expression:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(in_row.ColumnA.equals ("YES") &amp;amp;&amp;amp; in_row.ColumnB("NO")) ? "1":&lt;BR /&gt;(in_row.ColumnA.equals("NO") &amp;amp;&amp;amp; in_row.ColumnB.equals("YES"))? "2": ""&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ColumnA and ColumnB are string. And I want to create a new out column that has 3 values&amp;nbsp; depending on columnA and columnB values: 1, 2 or empty.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone give me any pointers on how to proceed from here ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 16:48:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249210#M33833</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-12T16:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: If then else expression in Tmap : ERROR</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249211#M33834</link>
      <description>&lt;P&gt;initially check either columnA&amp;nbsp; or columnB not equal to null. As we don't want both nulls in two columns&lt;/P&gt;
&lt;P&gt;then&lt;/P&gt;
&lt;P&gt;write this expression as per your requirement&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(in_row.ColumnA.equals ("YES") &amp;amp;&amp;amp; in_row.ColumnB("NO")) ? "1":&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"2"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 17:30:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249211#M33834</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-12T17:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: If then else expression in Tmap : ERROR</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249212#M33835</link>
      <description>&lt;P&gt;Adding to that am assuming in columns a and column b we have only yes, no and null, Please confirm it&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 17:31:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249212#M33835</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-12T17:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: If then else expression in Tmap : ERROR</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249213#M33836</link>
      <description>Yes , the values in those columns are either yes, no or null</description>
      <pubDate>Tue, 12 Mar 2019 18:21:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249213#M33836</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-12T18:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: If then else expression in Tmap : ERROR</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249214#M33837</link>
      <description>&lt;P&gt;Then you will have mutiple combinations&lt;/P&gt;
&lt;P&gt;ColumnA&amp;nbsp; &amp;nbsp; ColumnB&lt;/P&gt;
&lt;P&gt;null&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;yes&lt;/P&gt;
&lt;P&gt;yes&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;null&lt;/P&gt;
&lt;P&gt;null&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;no&lt;/P&gt;
&lt;P&gt;no&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;null&lt;/P&gt;
&lt;P&gt;no&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;yes&lt;/P&gt;
&lt;P&gt;yes&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; no&lt;/P&gt;
&lt;P&gt;no&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;no&lt;/P&gt;
&lt;P&gt;yes&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;yes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even if you want to populate only the value for your chosen combination before as below, you should one particular value with string you chosen its an empty&amp;nbsp; string which is fine, but you should check&amp;nbsp; the condition&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;columnA&amp;nbsp; or columnB not equal to null, that means both not equal to null , but its not required if you want to use a specific combination as below you can set all values to empty string&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;(in_row.ColumnA.equals ("YES") &amp;amp;&amp;amp; in_row.ColumnB("NO")) ? "1":&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;(in_row.ColumnA.equals("NO") &amp;amp;&amp;amp; in_row.ColumnB.equals("YES"))? "2"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;But use below&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;function , you did not write in_row.columnB.equals("No") may be that caused problem&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;But&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;use below function&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;(in_row.ColumnA.equalsIgnoreCase("YES") &amp;amp;&amp;amp; in_row.ColumnB.equalsIgnoreCase&amp;nbsp;("NO")) ? "1":&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;(in_row.ColumnA.equalsIgnoreCase("NO") &amp;amp;&amp;amp; in_row.ColumnB.equalsIgnoreCase("YES"))? "2"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;Please give kudos if it solves your issue and accept as solution&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 18:33:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249214#M33837</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-12T18:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: If then else expression in Tmap : ERROR</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249215#M33838</link>
      <description>I agree with Manish. Just To avoid null pointer&lt;BR /&gt;&lt;BR /&gt;Use (“yes”).equalIgnoreCase(row1....)&lt;BR /&gt;&lt;BR /&gt;Instead of&lt;BR /&gt;in_row.ColumnA.equalsIgnoreCase("YES")&lt;BR /&gt;&lt;BR /&gt;In this case if any of two column is null , output will be “”</description>
      <pubDate>Tue, 12 Mar 2019 21:11:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249215#M33838</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-03-12T21:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: If then else expression in Tmap : ERROR</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249216#M33839</link>
      <description>&lt;P&gt;Yes, Always we should eye to avoid null pointer exception&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LP7CAAW"&gt;@uganesh&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 21:14:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249216#M33839</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-12T21:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: If then else expression in Tmap : ERROR</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249217#M33840</link>
      <description>&lt;P&gt;I am currently testing this expression.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Crossing my fingers it works..&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 13:43:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249217#M33840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-13T13:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: If then else expression in Tmap : ERROR</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249218#M33841</link>
      <description>&lt;P&gt;If it worked , please make this topic as resolved. It helps others.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 16:14:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-expression-in-Tmap-ERROR/m-p/2249218#M33841</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-03-15T16:14:09Z</dc:date>
    </item>
  </channel>
</rss>

