<?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: Design a logic in talend in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Design-a-logic-in-talend/m-p/2251256#M35268</link>
    <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for the reply. I was doing as per this way only but If I test that code in Expression tab it always throws some java error.&lt;/P&gt; 
&lt;P&gt;ERROR-Exception in thread 'main'. Unresolved compilation error. For simple codes also it throws some erro&lt;/P&gt;</description>
    <pubDate>Thu, 19 Sep 2019 08:01:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-09-19T08:01:10Z</dc:date>
    <item>
      <title>Design a logic in talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Design-a-logic-in-talend/m-p/2251254#M35266</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I am a newbie to talend. Please help me to implemement below logic in Talend.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if (In_Date_Check = '1') then&lt;BR /&gt;Out_Years := date_diff(to_date(CURDATE('DD/MM/YYYY'), 'DD/MM/YYYY'), In_Date, 'Y')&lt;BR /&gt;if (Out_Years &amp;lt; 0) then&lt;BR /&gt;Out_Status := 'Valid'&lt;BR /&gt;Out_Status_Note := 'Age is negative'&lt;BR /&gt;elseif (Out_Years &amp;gt;= 0 and Out_Years &amp;lt; 18) then&lt;BR /&gt;Out_Status := 'Valid'&lt;BR /&gt;Out_Status_Note := 'Minor'&lt;BR /&gt;elseif (Out_Years &amp;gt;= 18 and Out_Years &amp;lt;= 120) then&lt;BR /&gt;Out_Status := 'Valid'&lt;BR /&gt;Out_Status_Note := 'Adult'&lt;BR /&gt;else&lt;BR /&gt;Out_Status := 'Invalid'&lt;BR /&gt;Out_Status_Note := 'Current age is over 120 years'&lt;BR /&gt;endif&lt;BR /&gt;else&lt;BR /&gt;Out_Status := 'Invalid'&lt;BR /&gt;Out_Status_Note := 'Invalid date input'&lt;BR /&gt;endif&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:38:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Design-a-logic-in-talend/m-p/2251254#M35266</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Design a logic in talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Design-a-logic-in-talend/m-p/2251255#M35267</link>
      <description>&lt;P&gt;You can use ternary notation to replace "if-then-else" like this:&lt;/P&gt; 
&lt;PRE&gt;"AAA".equals(row1.field1) ? "Only A" : "BBB".equals(row1.field1) ? "Only B" : "Something else"&lt;/PRE&gt; 
&lt;P&gt;You can combine as many levels as needed but more than 3 or 4 make code difficult to read/maintain.&lt;/P&gt; 
&lt;P&gt;To get current date use the following expression:&lt;/P&gt; 
&lt;PRE&gt;TalendDate.getCurrentDate()&lt;/PRE&gt; 
&lt;P&gt;Finally to compare dates, use:&lt;/P&gt; 
&lt;PRE&gt;TalendDate.compareDate(myDate1, myDate2)&lt;/PRE&gt; 
&lt;P&gt;This will render&amp;nbsp;-1 if first date is less than second one,&amp;nbsp;0 if both are equals and 1 if&amp;nbsp;first date is bigger than second.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 07:48:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Design-a-logic-in-talend/m-p/2251255#M35267</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-09-19T07:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Design a logic in talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Design-a-logic-in-talend/m-p/2251256#M35268</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for the reply. I was doing as per this way only but If I test that code in Expression tab it always throws some java error.&lt;/P&gt; 
&lt;P&gt;ERROR-Exception in thread 'main'. Unresolved compilation error. For simple codes also it throws some erro&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 08:01:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Design-a-logic-in-talend/m-p/2251256#M35268</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-19T08:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Design a logic in talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Design-a-logic-in-talend/m-p/2251257#M35269</link>
      <description>Share your code</description>
      <pubDate>Thu, 19 Sep 2019 08:04:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Design-a-logic-in-talend/m-p/2251257#M35269</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-09-19T08:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Design a logic in talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Design-a-logic-in-talend/m-p/2251258#M35270</link>
      <description>&lt;P&gt;I have sent a private message.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 08:08:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Design-a-logic-in-talend/m-p/2251258#M35270</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-19T08:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Design a logic in talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Design-a-logic-in-talend/m-p/2251259#M35271</link>
      <description>Thanks to continue in the post.
&lt;BR /&gt;At least replace -- by - for substraction and replace == by equals() for strings comparison</description>
      <pubDate>Thu, 19 Sep 2019 08:26:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Design-a-logic-in-talend/m-p/2251259#M35271</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-09-19T08:26:56Z</dc:date>
    </item>
  </channel>
</rss>

