<?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: Exit ForEach loop with condition (like in a WHILE statement) in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2545#M1128</link>
    <description>&lt;P&gt;You should looking into droppong your list into a collection then execute SQL against the collection to get your desired entry / entries.  I have found this extremely useful for limiting iteration as well as nested looping, greatly reducing the complexity  and size (number of actions) required for various recipes.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2022 21:00:03 GMT</pubDate>
    <dc:creator>david-macintosh</dc:creator>
    <dc:date>2022-03-15T21:00:03Z</dc:date>
    <item>
      <title>Exit ForEach loop with condition (like in a WHILE statement)</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2540#M1123</link>
      <description>&lt;P&gt;Hello Workato Community,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Is there a way to exit a ForEach loop given a specifc condition (like in a WHILE statement)? &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I'm just looking for an ID in a list and I want to stop the ForEach once the ID is found.&lt;/P&gt;&lt;P&gt;I added an IF condition inside the ForEach but, as per my understanding, this would just prevent the following steps inside the ForEach from being executed, but the ForEach would still need to iterate through the whole list.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Filipe&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 04:17:41 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2540#M1123</guid>
      <dc:creator>filipe-oliveira</dc:creator>
      <dc:date>2022-03-15T04:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Exit ForEach loop with condition (like in a WHILE statement)</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2541#M1124</link>
      <description>&lt;P&gt;This is the only way that I am aware of the do it. I know it seems like a waste of cycles but the iteration happens pretty quickly. This feature is much much needed and long overdue.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 04:32:57 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2541#M1124</guid>
      <dc:creator>vinny-sosa</dc:creator>
      <dc:date>2022-03-15T04:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Exit ForEach loop with condition (like in a WHILE statement)</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2542#M1125</link>
      <description>&lt;P&gt;You could call a function to iterate on the loop and then return response/stop job from the function when it meets the criteria. You would still need a list to iterate through in the function. &lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 04:41:51 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2542#M1125</guid>
      <dc:creator>ajorde</dc:creator>
      <dc:date>2022-03-15T04:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Exit ForEach loop with condition (like in a WHILE statement)</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2543#M1126</link>
      <description>&lt;P&gt;sometimes the .where function can help prevent unnecessary loops.  &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I also echo Vinny, as an engineer I hate wasting electrons but a simple if statement also gets the job done.  I have tried many different ways of breaking a loop in Workato and it didn't work out well - so now I just keep it simple.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 05:01:54 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2543#M1126</guid>
      <dc:creator>mike-flynn1</dc:creator>
      <dc:date>2022-03-15T05:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Exit ForEach loop with condition (like in a WHILE statement)</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2544#M1127</link>
      <description>&lt;P&gt;Vinny and I just discussed this recently. You can submit product feedback on this.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 09:23:15 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2544#M1127</guid>
      <dc:creator>rachelnatik</dc:creator>
      <dc:date>2022-03-15T09:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Exit ForEach loop with condition (like in a WHILE statement)</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2545#M1128</link>
      <description>&lt;P&gt;You should looking into droppong your list into a collection then execute SQL against the collection to get your desired entry / entries.  I have found this extremely useful for limiting iteration as well as nested looping, greatly reducing the complexity  and size (number of actions) required for various recipes.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 21:00:03 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2545#M1128</guid>
      <dc:creator>david-macintosh</dc:creator>
      <dc:date>2022-03-15T21:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Exit ForEach loop with condition (like in a WHILE statement)</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2546#M1129</link>
      <description>&lt;P&gt;Hello Folks,&lt;/P&gt;&lt;P&gt;You can use this pattern to break form a loop.&lt;/P&gt;&lt;P&gt;&lt;A href="https://app.workato.com/recipes/2307245?st=a4fbd0" target="_blank" rel="noreferrer noopener"&gt;Loop Break Example&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Mar 2022 21:24:31 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2546#M1129</guid>
      <dc:creator>omri-benmoshe</dc:creator>
      <dc:date>2022-03-15T21:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Exit ForEach loop with condition (like in a WHILE statement)</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2547#M1130</link>
      <description>&lt;P&gt;I've added a link to EU Costomers&lt;/P&gt;&lt;P&gt;&lt;A href="https://app.eu.workato.com/recipes/15256?st=1c4ebb" target="_blank" rel="noreferrer noopener"&gt;Loop Break Example EU&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 21:37:01 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2547#M1130</guid>
      <dc:creator>omri-benmoshe</dc:creator>
      <dc:date>2022-03-15T21:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Exit ForEach loop with condition (like in a WHILE statement)</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2548#M1131</link>
      <description>&lt;P&gt;Hi Omri - doesn't the Stop Job exit the entire job?   What if you want to continue processing after you leave the loop?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 04:16:02 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2548#M1131</guid>
      <dc:creator>kolson</dc:creator>
      <dc:date>2022-03-17T04:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Exit ForEach loop with condition (like in a WHILE statement)</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2549#M1132</link>
      <description>&lt;P&gt;Hey Kris, because the error that is being thrown is inside of the Monitor block, it just exits the loop, and the following steps after the On Error block will continue to be executed. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 02:42:29 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/exit-foreach-loop-with-condition-like-in-a-while-statement/m-p/2549#M1132</guid>
      <dc:creator>brock-richard</dc:creator>
      <dc:date>2022-03-29T02:42:29Z</dc:date>
    </item>
  </channel>
</rss>

