<?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 output values from tJava input it in trigger Run if in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-output-values-from-tJava-input-it-in-trigger-Run-if/m-p/2325277#M94893</link>
    <description>I tried to declare my variable "int output_row1;" in my tJava code.&lt;BR /&gt;&lt;BR /&gt;And i did this "((Integer)globalMap.get("output_row1.etat")) == 1" in my Run if connector.&lt;BR /&gt;But it's not better.&lt;BR /&gt;i have this error message : "he left-hand side of an assignment must be a variable"</description>
    <pubDate>Tue, 09 Jul 2019 10:00:15 GMT</pubDate>
    <dc:creator>gadje1</dc:creator>
    <dc:date>2019-07-09T10:00:15Z</dc:date>
    <item>
      <title>How output values from tJava input it in trigger Run if</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-output-values-from-tJava-input-it-in-trigger-Run-if/m-p/2325275#M94891</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I would like to execute one action or another depending on the result of a tJava component.&lt;BR /&gt;If the job runs before 15:00, the trigger (if_10_15) will be executed.&lt;BR /&gt;If the job is executed after 15:00, it will be the trigger (if_15_18) that will be executed.&lt;BR /&gt;I do not know how to do this. I put an exit in each of my conditions of my tJava (row1.etat) and connected it via a trigger "Run if" containing the conditions if (row1.etat == -1), if (row1.etat == 0) and if (row1.etat == 1).&lt;BR /&gt;But I have some errors.&lt;BR /&gt;If anyone could show me the right way, it would be nice.&lt;BR /&gt;Thank you in advance.&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;My tJava code :&lt;/P&gt; 
&lt;PRE&gt;SimpleDateFormat dateformat = new SimpleDateFormat("hh:mm"); 
Date hLim = dateformat.parse("15:00"); 
String pattern = "HH:mm"; 
Date hNow = new Date();
int etat = TalendDate.compareDate(hNow, hLim, pattern);

// Faire passer la valeur de etat en argument au "Trigger Run if" 
if (etat == -1){
	System.out.println(etat + " / " + hNow + " / " + " Tournée demain matin");
	row1.etat = etat;
} 
if (etat == 0){
	System.out.println(etat + " / " + hNow + " / " + " Tournée demain matin");
	row1.etat = etat;
} 
else if (etat == 1){
	System.out.println(etat + " / " + hNow + " / " + " Tournée demain après-midi");
	row1.etat = etat;
}&lt;/PRE&gt; 
&lt;P&gt;My job structure :&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-center" image-alt="JobListesTourneesBaches.JPG" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5re.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154512i4EE16D7D0055C0F8/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5re.jpg" alt="0683p000009M5re.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:20:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-output-values-from-tJava-input-it-in-trigger-Run-if/m-p/2325275#M94891</guid>
      <dc:creator>gadje1</dc:creator>
      <dc:date>2024-11-16T05:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: How output values from tJava input it in trigger Run if</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-output-values-from-tJava-input-it-in-trigger-Run-if/m-p/2325276#M94892</link>
      <description>&lt;P&gt;Try putting the etat variable into the globalMap and reading it in the 'if' connections from there.&amp;nbsp; It might not work as a row variable like you have it.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 09:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-output-values-from-tJava-input-it-in-trigger-Run-if/m-p/2325276#M94892</guid>
      <dc:creator>nfz11</dc:creator>
      <dc:date>2019-07-09T09:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: How output values from tJava input it in trigger Run if</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-output-values-from-tJava-input-it-in-trigger-Run-if/m-p/2325277#M94893</link>
      <description>I tried to declare my variable "int output_row1;" in my tJava code.&lt;BR /&gt;&lt;BR /&gt;And i did this "((Integer)globalMap.get("output_row1.etat")) == 1" in my Run if connector.&lt;BR /&gt;But it's not better.&lt;BR /&gt;i have this error message : "he left-hand side of an assignment must be a variable"</description>
      <pubDate>Tue, 09 Jul 2019 10:00:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-output-values-from-tJava-input-it-in-trigger-Run-if/m-p/2325277#M94893</guid>
      <dc:creator>gadje1</dc:creator>
      <dc:date>2019-07-09T10:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: How output values from tJava input it in trigger Run if</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-output-values-from-tJava-input-it-in-trigger-Run-if/m-p/2325278#M94894</link>
      <description>At the end of your tJava write:&lt;BR /&gt;globalMap.put("etat",etat);&lt;BR /&gt;&lt;BR /&gt;And in your if connector write:&lt;BR /&gt;((Integer)globalMap.get("etat")) == 1&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Jul 2019 10:28:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-output-values-from-tJava-input-it-in-trigger-Run-if/m-p/2325278#M94894</guid>
      <dc:creator>nfz11</dc:creator>
      <dc:date>2019-07-09T10:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: How output values from tJava input it in trigger Run if</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-output-values-from-tJava-input-it-in-trigger-Run-if/m-p/2325279#M94895</link>
      <description>&lt;P&gt;Thanks a lot for your respons. Everything works now with your solution.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 13:44:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-output-values-from-tJava-input-it-in-trigger-Run-if/m-p/2325279#M94895</guid>
      <dc:creator>gadje1</dc:creator>
      <dc:date>2019-07-09T13:44:24Z</dc:date>
    </item>
  </channel>
</rss>

