<?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: Problem in tMap (datarange &amp; conditions) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Problem-in-tMap-datarange-conditions/m-p/2307238#M78693</link>
    <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;&amp;nbsp;Thank you so much. It works. I was working and forgot to instant check forum. I had issue on the first condition, checking if both were null.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks again, what a relief when you F6 and it works !&lt;/P&gt;</description>
    <pubDate>Thu, 03 May 2018 14:13:05 GMT</pubDate>
    <dc:creator>daez</dc:creator>
    <dc:date>2018-05-03T14:13:05Z</dc:date>
    <item>
      <title>Problem in tMap (datarange &amp; conditions)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-in-tMap-datarange-conditions/m-p/2307235#M78690</link>
      <description>&lt;P&gt;Hello dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a new talend open studio user, I'm struggling on a job, looking for some help.I have a XML file that i get from tHttpRequest; then a main row to textractXMLfield to formatdata.&lt;/P&gt;&lt;P&gt;Problem is, I have a field returning "&amp;nbsp;2018-02-20T22:00+0200/2018-03-31T23:59+0200 " which is a data range where a discount_price is active.&lt;/P&gt;&lt;P&gt;I need to consider that in my formatting &amp;amp; only show the discount_price if the current date is between this range, so i splitted it (with tExtractDelimitedFields) and get an input for my tMap which looks :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tLogRow (input)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tMap (out)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tLogRow&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID&lt;/P&gt;&lt;P&gt;date_begin&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;discount_price&lt;/P&gt;&lt;P&gt;date_end&lt;/P&gt;&lt;P&gt;discount_price&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date_begin &amp;amp; Date end looks like : "yyyy-MM-dd".&lt;/P&gt;&lt;P&gt;I would like my out of tMap with ID of products and discount_price shown only if current date is between date_begin &amp;amp; date_end, otherwise empty field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I tried something like this to begin&amp;nbsp;as a condition on the out :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(TalendDate.compareDate(TalendDate.getCurrentDate(),TalendDate.parseDate("yyyy-MM-dd",row7.date1)) == 1 &amp;amp;&amp;amp; TalendDate.compareDate(TalendDate.getCurrentDate(),TalendDate.parseDate("yyyy-MM-dd",row7.date4)) == -1)? row7.Discount_price : " "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But infortunately; after 6 rows, errors :&amp;nbsp;Caused by: java.text.ParseException: Unparseable date: "". My 7th rows has an empty date,&amp;nbsp; I have no idea how to check this condition, neither rewrite price only if the data is between range.&lt;BR /&gt;&lt;BR /&gt;If someone could unlock me, would be very (very) appreciable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 13:21:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-in-tMap-datarange-conditions/m-p/2307235#M78690</guid>
      <dc:creator>daez</dc:creator>
      <dc:date>2018-05-03T13:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in tMap (datarange &amp; conditions)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-in-tMap-datarange-conditions/m-p/2307236#M78691</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LOMwAAO"&gt;@daez&lt;/A&gt;,can you try the below expresion. since some in 7th row you were getting empty values,so thats why it is not able to convert.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;row7.date1 != "" &amp;amp;&amp;amp; row7.date4 != "" ?((TalendDate.compareDate(TalendDate.getCurrentDate(),TalendDate.parseDate("yyyy-MM-dd",row7.date1)) == 1 &amp;amp;&amp;amp; TalendDate.compareDate(TalendDate.getCurrentDate(),TalendDate.parseDate("yyyy-MM-dd",row7.date4)) == -1)? row7.Discount_price : " "):" "&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 13:44:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-in-tMap-datarange-conditions/m-p/2307236#M78691</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2018-05-03T13:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in tMap (datarange &amp; conditions)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-in-tMap-datarange-conditions/m-p/2307237#M78692</link>
      <description>&lt;P&gt;You'll need an empty string&amp;nbsp; / null check when you parse those variables &lt;SPAN&gt;. I typically add a few temp vars to the tMap in the middle column to accomplish this. see my example below&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2018-05-03_8-47-14.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lx6O.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136361iFF3540785953BAB9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lx6O.png" alt="0683p000009Lx6O.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 13:47:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-in-tMap-datarange-conditions/m-p/2307237#M78692</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-03T13:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in tMap (datarange &amp; conditions)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Problem-in-tMap-datarange-conditions/m-p/2307238#M78693</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;&amp;nbsp;Thank you so much. It works. I was working and forgot to instant check forum. I had issue on the first condition, checking if both were null.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks again, what a relief when you F6 and it works !&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 14:13:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Problem-in-tMap-datarange-conditions/m-p/2307238#M78693</guid>
      <dc:creator>daez</dc:creator>
      <dc:date>2018-05-03T14:13:05Z</dc:date>
    </item>
  </channel>
</rss>

