<?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: RunIf does not seem to work in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360521#M125083</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;With your use case, you need to use "if...else" method in tjavarow and&lt;/P&gt;&lt;P&gt;the data Type "boolean" will return to true or false.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sabrina&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Sep 2023 08:28:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-09-26T08:28:10Z</dc:date>
    <item>
      <title>RunIf does not seem to work</title>
      <link>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360518#M125080</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following situation :&lt;/P&gt;&lt;P&gt;tDBinput --&amp;gt; tJavaRow --&amp;gt; RunIf-trigger --&amp;gt; SubJob To be executed when RunIf condition is true&lt;/P&gt;&lt;P&gt;                                          RunIf-trigger &lt;/P&gt;&lt;P&gt;--&amp;gt; SubJob To be executed when RunIf condition is true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the tJavaRow component I have to following code to set a context variable which I want to use in the run-if trigger:&lt;/P&gt;&lt;P&gt;context.setProperty("TableToProcess", row1.source_table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the RunIf-trigger I use : &lt;/P&gt;&lt;P&gt;context.getProperty("TableToProcess").equals("&lt;/P&gt;&lt;P&gt;AKTKONPF&lt;/P&gt;")&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to trigger the sub-job when the value of the context variable is "AKTKONPF"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The line &lt;/P&gt;&lt;P&gt;context.getProperty("TableToProcess").equals("AKTKONPF") results in true or false, but when places in the RunIf-trigger, it is allways false.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jacco&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:23:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360518#M125080</guid>
      <dc:creator>Jacco_De_Zwart</dc:creator>
      <dc:date>2024-11-15T21:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: RunIf does not seem to work</title>
      <link>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360519#M125081</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;If you are creating some variables in tJavaRow, then you can assign them to globalMap varibles like&lt;/P&gt;&lt;P&gt;'globalMap.put("myVar","myVarValue")' in tJavaRow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;on tJavaRow:&lt;/P&gt;&lt;P&gt; if(row1.source_table.equals("AKTKONPF")){&lt;/P&gt;&lt;P&gt; globalMap.put("TableToProcess", true);&lt;/P&gt;&lt;P&gt; }else{&lt;/P&gt;&lt;P&gt; globalMap.put("TableToProcess", false);&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; set the condition of runIf trigger:&lt;/P&gt;&lt;P&gt; (Boolean)globalMap.get("TableToProcess") or  !(Boolean)globalMap.get("TableToProcess") which is depended on your needs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps for you.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sabrina&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 06:39:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360519#M125081</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-26T06:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: RunIf does not seem to work</title>
      <link>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360520#M125082</link>
      <description>&lt;P&gt;Hi Sabrina,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your response !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I actually want to do is this :&lt;/P&gt;&lt;P&gt;I first get al list of all the tables I want to process. Based on the name of the table I have to do something different with the data from that table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So based on the query results I check which part of the flow I need to take with tJavaRow :&lt;/P&gt;&lt;P&gt;globalMap.put("TableToProcess", row1.source_table):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000ofFCEAA2.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139865i05398007B0655641/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000ofFCEAA2.jpg" alt="0695b00000ofFCEAA2.jpg" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then with the Run-If trigger check which part of the flow I need to take. For instance, with two tablenames AKTKONPF and DOSADFPF I have one Run-If&lt;/P&gt;&lt;P&gt;(Boolean)globalMap.get("TableToProcess").equals("AKTKONPF")&lt;/P&gt;&lt;P&gt;and an other one &lt;/P&gt;&lt;P&gt;(Boolean)globalMap.get("TableToProcess").equals("DOSADFPF")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is, is that the checks in the Run-If doesn't seem to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong ??&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 08:01:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360520#M125082</guid>
      <dc:creator>Jacco_De_Zwart</dc:creator>
      <dc:date>2023-09-26T08:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: RunIf does not seem to work</title>
      <link>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360521#M125083</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;With your use case, you need to use "if...else" method in tjavarow and&lt;/P&gt;&lt;P&gt;the data Type "boolean" will return to true or false.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sabrina&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 08:28:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360521#M125083</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-26T08:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: RunIf does not seem to work</title>
      <link>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360522#M125084</link>
      <description>&lt;P&gt;. . . so for each table I want to process, I need a boolean type global variable ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so in tJavaRow would look like :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(row1.source_table.equals("AKTKONPF")){&lt;/P&gt;&lt;P&gt;globalMap.put("TableToProcessAKTKONPF", true);&lt;/P&gt;&lt;P&gt;}else{&lt;/P&gt;&lt;P&gt;if(row1.source_table.equals("DOSADFPF"))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;globalMap.put("TableToProcessDOSADFPF", true);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and in each Run-If trigger :&lt;/P&gt;&lt;P&gt;(Boolean)globalMap.get("TableToProcessAKTKONPF")&amp;nbsp;in order to process the AKTKONPF table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and in the other Run-If trigger :&lt;/P&gt;&lt;P&gt;(Boolean)globalMap.get("TableToProcessDOSADFPF")&amp;nbsp;in order to process the DOSADFPF table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is that what you mean ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 08:35:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360522#M125084</guid>
      <dc:creator>Jacco_De_Zwart</dc:creator>
      <dc:date>2023-09-26T08:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: RunIf does not seem to work</title>
      <link>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360523#M125085</link>
      <description>&lt;P&gt;Hi Mr. Black,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you printing something in tLogRow_1 and tLogRow_2?&lt;/P&gt;&lt;P&gt;I suggest you to rely on the tLogRow output rather than the designer preview.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because in your row1 I see 5 rows, but the "false" state you read in the 2 IFs of the preview refers only to the last and 5th row. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 09:46:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360523#M125085</guid>
      <dc:creator>Fabio_Caimi</dc:creator>
      <dc:date>2023-09-26T09:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: RunIf does not seem to work</title>
      <link>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360524#M125086</link>
      <description>&lt;P&gt;Fabio,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The tLogRow's are just for testing purposes only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The query result in tDBInput results in a list of table names. Two of them are AKTKONPF and DOSADFPF, which in my idea would fire the Run-If triggers because of the condition like (Boolean)globalMap.get("TableToProcess").equals("AKTKONPF") in the first and (Boolean)globalMap.get("TableToProcess").equals("DOSADFPF") in the second.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result of the tDBInput GetSOurceTables is a simple list :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000ofFdjAAE.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147649iC27FF3641DEB67B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000ofFdjAAE.png" alt="0695b00000ofFdjAAE.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, both of the Run-If trigger should fire because the value of TableToProcess is set with the right values. And therefor, both the tLogRow's should show some result as a matter of test. The tLogRows should show the row count of both tables, the query in tDBInput is a simple select count() from AKTKONPF and select count() from DOSADFPF. Just to see is something is executed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the designer screen, it doesn't seem to work, but all so there is no result at run-time :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000ofFdUAAU.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137335iD09D2B54C89F389A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000ofFdUAAU.png" alt="0695b00000ofFdUAAU.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 10:03:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360524#M125086</guid>
      <dc:creator>Jacco_De_Zwart</dc:creator>
      <dc:date>2023-09-26T10:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: RunIf does not seem to work</title>
      <link>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360525#M125087</link>
      <description>&lt;P&gt;small addition. ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it works for just one (1) table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I limit the query of GetSourceTables to 1 row,  it works. The table AKTKONPF is the first in the query result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I limit the query to 3, then DOSADFPF is the 3th record, it only works for DOSADFPF table. Not for AKTKONPF table, which came first.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I need an iterate or something ? ?? &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 10:08:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360525#M125087</guid>
      <dc:creator>Jacco_De_Zwart</dc:creator>
      <dc:date>2023-09-26T10:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: RunIf does not seem to work</title>
      <link>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360526#M125088</link>
      <description>&lt;P&gt;GOT IT !!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After your hints, it kept me thinking. And after a few more experiments here's the result and it works !!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000ofG91AAE.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154106iBE81DBDC16DEBC2E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000ofG91AAE.png" alt="0695b00000ofG91AAE.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The tDBInput GetSourceTables qeuries the tables that need to be processed.&lt;/LI&gt;&lt;LI&gt;In the InterateTheTables I go over each of the records from the result set.&lt;/LI&gt;&lt;LI&gt;In WhichTableToProcess I set a global variable with the name of the table in the variable TableToProcess&lt;/LI&gt;&lt;LI&gt;In the Run-If trigger I check for the name of the table in the global variable with statement like :&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                    globalMap.get("TableToProcess").equals("AKTKONPF")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So even if the query returns 5 tables that need to be processed, and only 3 are matched in the Run-If trigger, only those tables are actually processed. And if there is a Run-If trigger configured for a table that is not in the resultset of tDBInput GetSourceTables, that Run-If trigger results in False and will not be executed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my experiment the result is a count of the records in the tables that needed processing :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000ofGBqAAM.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130036i97198DD62EDC29AB/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000ofGBqAAM.png" alt="0695b00000ofGBqAAM.png" /&gt;&lt;/span&gt;So thanks Sabrina and Fabio for you hints an keeping my train-of-thought going !!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jacco&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 12:05:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360526#M125088</guid>
      <dc:creator>Jacco_De_Zwart</dc:creator>
      <dc:date>2023-09-26T12:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: RunIf does not seem to work</title>
      <link>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360527#M125089</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Great it works and feel free to let us know if there is any further help we can give.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 03:56:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/RunIf-does-not-seem-to-work/m-p/2360527#M125089</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-27T03:56:42Z</dc:date>
    </item>
  </channel>
</rss>

