<?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 Talend If in Tmap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Talend-If-in-Tmap/m-p/2325591#M95177</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have condition where doing insert in Salesforce.&lt;/P&gt;
&lt;P&gt;If field1= 'CHQ' then FinalDate = date1&lt;/P&gt;
&lt;P&gt;else if field1 = 'CB' then FinalDate = Date2&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Salesforce, field is null&lt;/P&gt;
&lt;P&gt;Can SomeOne Help me.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 05:20:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T05:20:47Z</dc:date>
    <item>
      <title>Talend If in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-If-in-Tmap/m-p/2325591#M95177</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have condition where doing insert in Salesforce.&lt;/P&gt;
&lt;P&gt;If field1= 'CHQ' then FinalDate = date1&lt;/P&gt;
&lt;P&gt;else if field1 = 'CB' then FinalDate = Date2&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Salesforce, field is null&lt;/P&gt;
&lt;P&gt;Can SomeOne Help me.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:20:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-If-in-Tmap/m-p/2325591#M95177</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T05:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Talend If in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-If-in-Tmap/m-p/2325592#M95178</link>
      <description>&lt;P&gt;Hello aichas,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;your code in the attached GIF is almost correct. Please do not use "==" for comparing strings, use the .equals() method.&lt;/P&gt;
&lt;PRE&gt;((row4.TypeCoupon.equals("CHQ") ? row4.DateCheque : row4.DateDignature))&lt;/PRE&gt;
&lt;P&gt;For your example given in the text, you can nest such ternary statements. The formula for "FinalDate" could be&lt;/P&gt;
&lt;PRE&gt;field1.equals("CHQ") ? date1 : field1.equals("CB") ? Date2 : date3&lt;/PRE&gt;
&lt;P&gt;"date3" is the value for "FinalDate" if field1 is not equal to "CHQ" or "CB".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thomas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 14:39:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-If-in-Tmap/m-p/2325592#M95178</guid>
      <dc:creator>ThWabi</dc:creator>
      <dc:date>2019-07-09T14:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Talend If in Tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-If-in-Tmap/m-p/2325593#M95179</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;just a small tip. Instead of using this:&lt;/P&gt; 
&lt;PRE&gt;field1.equals("CHQ")&lt;/PRE&gt; 
&lt;P&gt;use that:&lt;/P&gt; 
&lt;PRE&gt;"CHQ".equals(field1)&lt;/PRE&gt; 
&lt;P&gt;And you won't have NullPointerException anymore when field1 is null &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 14:18:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-If-in-Tmap/m-p/2325593#M95179</guid>
      <dc:creator>lennelei</dc:creator>
      <dc:date>2019-07-10T14:18:02Z</dc:date>
    </item>
  </channel>
</rss>

