<?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: How to compare two values in If-statement in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-values-in-If-statement/m-p/2368481#M131740</link>
    <description>&lt;P&gt;Thanks! I knew it should be something simple! changing the expression to .equals fixed it!&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2017 08:34:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-10-05T08:34:53Z</dc:date>
    <item>
      <title>How to compare two values in If-statement</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-values-in-If-statement/m-p/2368478#M131737</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In the below job, I try to separate rows from a delimited (.csv) file, so that only the rows where "Project_Stadium_Nieuw" and "Project_Stadium_Gisteren" are different, will continue.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Therefore I first use tFlowToIterate and subsequently put them again in Global Variables, including the Current Iteration number. And then I want to only let through the ones that have these different values. So I use this statement:&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;(Boolean)(((String)globalMap.get("Project_Stadium_Nieuw"+((Integer)globalMap.get("tFlowToIterate_1_CURRENT_ITERATION")))) != ((String)globalMap.get("Project_Stadium_Gisteren"+((Integer)globalMap.get("tFlowToIterate_1_CURRENT_ITERATION")))))&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But.. then everything goes through... While I deliberately put some differences in the input file. What am I doing wrong? Or should I set it up differently?&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please, your advice and tips are more than welcome! Thanks in advance!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IfStatement.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lqqg.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151852i929AD76656BFB3C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lqqg.png" alt="0683p000009Lqqg.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 15:48:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-values-in-If-statement/m-p/2368478#M131737</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-04T15:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two values in If-statement</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-values-in-If-statement/m-p/2368479#M131738</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;What is the main purpose of your job ?&lt;/P&gt;
&lt;P&gt;I mean what is exactly your input and what do you want in your output ?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 16:33:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-values-in-If-statement/m-p/2368479#M131738</guid>
      <dc:creator>Théo_Cap</dc:creator>
      <dc:date>2017-10-04T16:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two values in If-statement</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-values-in-If-statement/m-p/2368480#M131739</link>
      <description>Hi, 
&lt;BR /&gt;1st you don't need to compare tFlowToIterate_1_CURRENT_ITERATION with itself. So, you can eliminate this part. 
&lt;BR /&gt;2nd you can't use "!=" or "=" for String comparison. You need to use this syntax: 
&lt;BR /&gt;((String)globalMap.get("Project_Stadium_Nieuw")).equals((String)globalMap.get("Project_Stadium_Gisteren")) 
&lt;BR /&gt; 
&lt;BR /&gt;Should works. 
&lt;BR /&gt;However, using a tFilterRow or a tMap with a filter expression would be better (no need to transform flow to global and reverse). 
&lt;BR /&gt; 
&lt;BR /&gt;Hope this helps.</description>
      <pubDate>Wed, 04 Oct 2017 18:19:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-values-in-If-statement/m-p/2368480#M131739</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-10-04T18:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two values in If-statement</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-values-in-If-statement/m-p/2368481#M131740</link>
      <description>&lt;P&gt;Thanks! I knew it should be something simple! changing the expression to .equals fixed it!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 08:34:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-values-in-If-statement/m-p/2368481#M131740</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-05T08:34:53Z</dc:date>
    </item>
  </channel>
</rss>

