<?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: Break the For Each based on the condition in Community Chat</title>
    <link>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10365#M968</link>
    <description>&lt;P&gt;Thanks for the support/solution, able to apply the solution in the same line.&lt;/P&gt;</description>
    <pubDate>Fri, 04 Jul 2025 14:29:08 GMT</pubDate>
    <dc:creator>Rajesh_Nadella</dc:creator>
    <dc:date>2025-07-04T14:29:08Z</dc:date>
    <item>
      <title>Break the For Each based on the condition</title>
      <link>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10347#M964</link>
      <description>&lt;P&gt;Problem: Break the loop based on the if condition satisfied and continue to the next steps. is this can be achieved in workato.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 11:29:54 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10347#M964</guid>
      <dc:creator>Rajesh_Nadella</dc:creator>
      <dc:date>2025-07-01T11:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Break the For Each based on the condition</title>
      <link>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10350#M965</link>
      <description>&lt;P&gt;Based on your question, it seems you need to iterate over a list of values, exit the loop when a condition is met, and then proceed with the remaining steps in the recipe. (Please correct me if I've misunderstood.)&lt;/P&gt;&lt;P&gt;Currently, Workato doesn’t support a direct “break” statement to exit a For each loop. However, you can simulate this behavior using conditional logic. Here's a workaround approach:&lt;/P&gt;&lt;P&gt;1. Initialize a flag variable (Boolean, default: false) outside the loop.&lt;BR /&gt;2. Loop through the list of items using the For each action.&lt;BR /&gt;3. Within the loop, apply your primary condition to determine whether to stop further execution of loop actions. Combine this with a check on the flag variable (e.g., flag == false) so that the logic only runs before the break condition is triggered.&lt;BR /&gt;4. When the condition is met, set the flag variable to true. This ensures subsequent iterations skip the logic.&lt;/P&gt;&lt;P&gt;Outcome: The loop still iterates through all elements, but after the condition is met, no further actions inside the loop are executed — effectively mimicking a break.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 14:21:18 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10350#M965</guid>
      <dc:creator>manojksurisetty</dc:creator>
      <dc:date>2025-07-01T14:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Break the For Each based on the condition</title>
      <link>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10356#M966</link>
      <description>&lt;P&gt;You can use Repeat while loop action and you can provide the Condition to exit the loop.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jul 2025 08:55:41 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10356#M966</guid>
      <dc:creator>svayala</dc:creator>
      <dc:date>2025-07-03T08:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Break the For Each based on the condition</title>
      <link>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10361#M967</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/11533"&gt;@Rajesh_Nadella&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;To achieve the above requirement, here is the proposed solution:&lt;/P&gt;&lt;P&gt;Add a Monitor block inside the "For Each" loop:&lt;BR /&gt;Use this to validate each item. If a specific condition is met, stop the job by throwing an error. In the associated Error block, leave it empty (i.e., no action needed). or If need you can add logger/ slack notification&lt;/P&gt;&lt;P&gt;Place additional logic outside the "For Each" loop:&lt;BR /&gt;This ensures that any further processing continues only after the loop completes or is exited.&lt;/P&gt;&lt;P&gt;Advantage of using the Monitor block inside the loop:&lt;BR /&gt;It allows you to break out of the loop when a certain condition is met. However, note that this does not prevent the loop from continuing for other items unless the job is explicitly stopped.&lt;BR /&gt;&lt;BR /&gt;Please let me if this helps;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Break loop and continue.png" style="width: 700px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2191iF9F7FA79989895E5/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Break loop and continue.png" alt="Break loop and continue.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="success response.png" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2192i7FFB3CB38B906086/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="success response.png" alt="success response.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;BR /&gt;Shiva&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jul 2025 14:30:17 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10361#M967</guid>
      <dc:creator>shivakumara</dc:creator>
      <dc:date>2025-07-03T14:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Break the For Each based on the condition</title>
      <link>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10365#M968</link>
      <description>&lt;P&gt;Thanks for the support/solution, able to apply the solution in the same line.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jul 2025 14:29:08 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10365#M968</guid>
      <dc:creator>Rajesh_Nadella</dc:creator>
      <dc:date>2025-07-04T14:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Break the For Each based on the condition</title>
      <link>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10366#M969</link>
      <description>&lt;P&gt;Thanks for the response, able to find the solution from above.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jul 2025 14:30:44 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10366#M969</guid>
      <dc:creator>Rajesh_Nadella</dc:creator>
      <dc:date>2025-07-04T14:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Break the For Each based on the condition</title>
      <link>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10633#M1013</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/11533" target="_blank"&gt;@Rajesh_Nadella&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need to process only until a match is found and then skip further logic, you can filter the list to reduce size.&amp;nbsp;Use a flag (variable) to skip logic after condition is met.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Aug 2025 08:47:55 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/community-chat/break-the-for-each-based-on-the-condition/m-p/10633#M1013</guid>
      <dc:creator>sridevib</dc:creator>
      <dc:date>2025-08-10T08:47:55Z</dc:date>
    </item>
  </channel>
</rss>

