<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Implement Break Statement in the appian</title><link>https://community.appian.com/discussions/f/new-to-appian/26175/implement-break-statement-in-the-appian</link><description>Is there any method to getting out of the forEach() like any break loop method?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Implement Break Statement in the appian</title><link>https://community.appian.com/thread/102701?ContentTypeID=1</link><pubDate>Mon, 10 Oct 2022 15:57:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:04bf7dc1-caa4-476d-bc24-9e6482fc9770</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Wow. Didn&amp;#39;t know that. Thanks, Mike!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implement Break Statement in the appian</title><link>https://community.appian.com/thread/102698?ContentTypeID=1</link><pubDate>Mon, 10 Oct 2022 15:49:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f67d5dc8-fc14-446d-b95b-d39fb69d8cb1</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;instead of &lt;strong&gt;&lt;em&gt;null&lt;/em&gt;&lt;/strong&gt;, have it output &lt;em&gt;&lt;strong&gt;empty set&lt;/strong&gt;&lt;/em&gt; (&lt;strong&gt;{}&lt;/strong&gt;).&amp;nbsp; These will disappear from the output array (unless all results are an empty set - if this corner case is possible just wrap the a!forEach() in a!flatten() and the list of empty sets will be collapsed to an empty set).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implement Break Statement in the appian</title><link>https://community.appian.com/thread/102643?ContentTypeID=1</link><pubDate>Mon, 10 Oct 2022 10:45:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a7f8cc2b-09b3-4b5d-9ca2-8a476ccf836f</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;What kind of logic do you want to implement that you need a break for? In case you are looking for something more complex, check out my blog post:&amp;nbsp;&lt;a href="https://appian.rocks/2022/08/29/complex-algorithms-in-appian/"&gt;https://appian.rocks/2022/08/29/complex-algorithms-in-appian/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implement Break Statement in the appian</title><link>https://community.appian.com/thread/102634?ContentTypeID=1</link><pubDate>Mon, 10 Oct 2022 08:03:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ba540f93-038d-4cc0-ac92-8f6335294d88</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Nope. You can add an if condition in the a!forEach() and where you want to add a break, you can start putting null instead.&amp;nbsp;&lt;br /&gt;And in the end, you can reject all the null values.&amp;nbsp;&lt;br /&gt;-UPDATE-&lt;br /&gt;Adding the code block below.&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;reject(
  a!isNullOrEmpty(_),
  a!forEach(
    items: enumerate(10),
    expression: if(fv!item &amp;lt; 5, fv!item, null)
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>