<?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>How to find the max no from an array without using Max() ?</title><link>https://community.appian.com/discussions/f/new-to-appian/25532/how-to-find-the-max-no-from-an-array-without-using-max</link><description>Hi dear, 
 I have written code like in the picture, I just want to print the max no without using max function.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to find the max no from an array without using Max() ?</title><link>https://community.appian.com/thread/99599?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2022 08:07:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:095c1b64-5fe3-4386-80cb-5d13f2fe9e7d</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;I am just curious about why would you like to do it without the max() function? Because even tho there are multiple ways of doing it, but none of them will be as efficient as the max() function.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to find the max no from an array without using Max() ?</title><link>https://community.appian.com/thread/99594?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2022 06:47:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9a92fdff-bfc7-4a8f-8b41-ffb678689458</guid><dc:creator>Bejjenki_Rajender</dc:creator><description>&lt;p&gt;I tried , using todatasubset() function with using for each&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;a!localVariables(&lt;br /&gt; local!data: { 10, 5, 25, 70, 12 },&lt;br /&gt; local!getdata: a!forEach(&lt;br /&gt; items: local!data,&lt;br /&gt; expression: { Maxnumber: fv!item }&lt;br /&gt; ),&lt;br /&gt; index(&lt;br /&gt; index(&lt;br /&gt; todatasubset(&lt;br /&gt; arrayToPage: local!getdata,&lt;br /&gt; pagingConfiguration: a!pagingInfo(&lt;br /&gt; startIndex: 1,&lt;br /&gt; batchSize: 100,&lt;br /&gt; sort: a!sortInfo(field: &amp;quot;Maxnumber&amp;quot;, ascending: false)&lt;br /&gt; )&lt;br /&gt; ).data,&lt;br /&gt; &amp;quot;Maxnumber&amp;quot;,&lt;br /&gt; 1&lt;br /&gt; ),&lt;br /&gt; 1,&lt;br /&gt; {}&lt;br /&gt; )&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>