<?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 Help with Use of tjavaRow to iterate between rows. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Help-with-Use-of-tjavaRow-to-iterate-between-rows/m-p/2359973#M124652</link>
    <description>&lt;P&gt;I am stuck and need help with using trying to use tjavarow to iterate between rows, that are sorted and stored.&lt;/P&gt;&lt;P&gt;Here is how my flow looks like. I am sorting based on the MSH_10 field, but I keep getting terror that row75Struct cannot be resolved as a variable. &lt;/P&gt;&lt;P&gt;I will be glad for any help&lt;/P&gt;&lt;P&gt;&lt;B&gt;Code for the tjavarow:&lt;/B&gt;&lt;/P&gt;&lt;P&gt;// Initialize variables f// Initialize variables for storing the extracted field values&lt;/P&gt;&lt;P&gt;String msh10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Iterate through the sorted rows&lt;/P&gt;&lt;P&gt;&lt;B&gt;while&lt;/B&gt; (row75 != &lt;B&gt;null&lt;/B&gt;) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;// Extract the MSH.10 field value from the current row&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;msh10 = row75.MSH_10; // Use the exact field name as it appears in your schema&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;// Print the MSH.10 field value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;System.out.println("MSH_10 Value: " + msh10);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;// Perform your processing based on the sorted MSH.10 values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;// Example: If msh10 meets certain criteria, process the row&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;// Read the next row&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;row75 = row75Struct;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000oe7sKAAQ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128416iCD1395A27C351873/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000oe7sKAAQ.png" alt="0695b00000oe7sKAAQ.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Sep 2023 12:42:28 GMT</pubDate>
    <dc:creator>MAnywar</dc:creator>
    <dc:date>2023-09-19T12:42:28Z</dc:date>
    <item>
      <title>Help with Use of tjavaRow to iterate between rows.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Help-with-Use-of-tjavaRow-to-iterate-between-rows/m-p/2359973#M124652</link>
      <description>&lt;P&gt;I am stuck and need help with using trying to use tjavarow to iterate between rows, that are sorted and stored.&lt;/P&gt;&lt;P&gt;Here is how my flow looks like. I am sorting based on the MSH_10 field, but I keep getting terror that row75Struct cannot be resolved as a variable. &lt;/P&gt;&lt;P&gt;I will be glad for any help&lt;/P&gt;&lt;P&gt;&lt;B&gt;Code for the tjavarow:&lt;/B&gt;&lt;/P&gt;&lt;P&gt;// Initialize variables f// Initialize variables for storing the extracted field values&lt;/P&gt;&lt;P&gt;String msh10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Iterate through the sorted rows&lt;/P&gt;&lt;P&gt;&lt;B&gt;while&lt;/B&gt; (row75 != &lt;B&gt;null&lt;/B&gt;) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;// Extract the MSH.10 field value from the current row&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;msh10 = row75.MSH_10; // Use the exact field name as it appears in your schema&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;// Print the MSH.10 field value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;System.out.println("MSH_10 Value: " + msh10);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;// Perform your processing based on the sorted MSH.10 values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;// Example: If msh10 meets certain criteria, process the row&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;// Read the next row&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;row75 = row75Struct;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000oe7sKAAQ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128416iCD1395A27C351873/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000oe7sKAAQ.png" alt="0695b00000oe7sKAAQ.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 12:42:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Help-with-Use-of-tjavaRow-to-iterate-between-rows/m-p/2359973#M124652</guid>
      <dc:creator>MAnywar</dc:creator>
      <dc:date>2023-09-19T12:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Use of tjavaRow to iterate between rows.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Help-with-Use-of-tjavaRow-to-iterate-between-rows/m-p/2359974#M124653</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;row75Struct is not a variable in the generated Java code. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To access the input/output column on tJavaRow, use the expression like this:&lt;/P&gt;&lt;P&gt;output_row.columnName=input_row.columnName;&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;output_row.MSH_10=input_row.MSH_10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;During the job execution,  you can only access the current row or last N rows, you can't access the next row. What is your requirement? &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 09:36:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Help-with-Use-of-tjavaRow-to-iterate-between-rows/m-p/2359974#M124653</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-22T09:36:32Z</dc:date>
    </item>
  </channel>
</rss>

