<?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: [resolved] Nested If-Else block in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Nested-If-Else-block/m-p/2316360#M86913</link>
    <description>Tried using the statement below:
&lt;BR /&gt;OUT2.FIELD1 == null ? (OUT2.FIELD2.length() &amp;gt; 0 ? OUT2.FIELD2 : "OTHER") &amp;nbsp;: (OUT2.FIELD3.length() &amp;gt; 0 ? OUT2.FIELD3 : "OTHER")&amp;nbsp;
&lt;BR /&gt;But I keep getting a Java exception. Is it an issue with the length() function being used with a Null value coming fro Field2 or Field3 or is there something wrong with the way I'm writing the expression ?</description>
    <pubDate>Tue, 01 Dec 2015 09:34:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-12-01T09:34:59Z</dc:date>
    <item>
      <title>[resolved] Nested If-Else block</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Nested-If-Else-block/m-p/2316358#M86911</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;I have recently started working on Talend and need some help to implement the below logic :&lt;BR /&gt;If (Field1 is null)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; If (Length(Field2)&amp;gt;0)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"ABC"&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;If (Length(Field3)&amp;gt;0)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field3&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"ABC"&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;}&lt;BR /&gt;I have used the operators in talend to code this but somehow keep coming up with the null pointer exception. Please help .&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 17:42:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Nested-If-Else-block/m-p/2316358#M86911</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-30T17:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Nested If-Else block</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Nested-If-Else-block/m-p/2316359#M86912</link>
      <description>You can use in-line IFs for this. Something like below....&lt;BR /&gt;&lt;BR /&gt;Field1 == null ?&amp;nbsp;Field2.length()&amp;gt;0 ? Field2 : "ABC" : Field3.length()&amp;gt;0 ? Field3 : "ABC"</description>
      <pubDate>Mon, 30 Nov 2015 23:57:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Nested-If-Else-block/m-p/2316359#M86912</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-30T23:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Nested If-Else block</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Nested-If-Else-block/m-p/2316360#M86913</link>
      <description>Tried using the statement below:
&lt;BR /&gt;OUT2.FIELD1 == null ? (OUT2.FIELD2.length() &amp;gt; 0 ? OUT2.FIELD2 : "OTHER") &amp;nbsp;: (OUT2.FIELD3.length() &amp;gt; 0 ? OUT2.FIELD3 : "OTHER")&amp;nbsp;
&lt;BR /&gt;But I keep getting a Java exception. Is it an issue with the length() function being used with a Null value coming fro Field2 or Field3 or is there something wrong with the way I'm writing the expression ?</description>
      <pubDate>Tue, 01 Dec 2015 09:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Nested-If-Else-block/m-p/2316360#M86913</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-01T09:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Nested If-Else block</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Nested-If-Else-block/m-p/2316361#M86914</link>
      <description>It likely is caused by a null Field2. Always check for null before doing any other check. Try this....&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana," helvetica=""&gt;OUT2.FIELD1 == null ? ((OUT2.FIELD2!=null &amp;amp;&amp;amp;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana," helvetica=""&gt;OUT2.FIELD2&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana," helvetica=""&gt;.length() &amp;gt; 0) ? OUT2.FIELD2 : "OTHER") &amp;nbsp;: ((&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana," helvetica=""&gt;OUT2.FIELD3!=null &amp;amp;&amp;amp;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana," helvetica=""&gt;OUT2.FIELD3.length() &amp;gt; 0) ? OUT2.FIELD3 : "OTHER")&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Tue, 01 Dec 2015 09:40:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Nested-If-Else-block/m-p/2316361#M86914</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-01T09:40:10Z</dc:date>
    </item>
  </channel>
</rss>

