<?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>Question related to print the array</title><link>https://community.appian.com/discussions/f/user-interface/24340/question-related-to-print-the-array</link><description>QUESTION 1&amp;gt; Suppose we have 1 array : local!arr : {a,b,b,c,c,c,d,d,d,d}. Then how we will print in the pattern like 
 a, 
 b,b 
 c,c,c 
 d,d,d,d. 
 
 QUESTION 2&amp;gt;Suppose we have 2 - arr1: {&amp;quot;apple&amp;quot;,&amp;quot;banana&amp;quot;,&amp;quot;mango&amp;quot;}, arr2:{&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;}. 
 How we will print</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Question related to print the array</title><link>https://community.appian.com/thread/93923?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 07:05:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:53134262-e29e-472a-8064-d6519ef9d89a</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;Hi, in simple way you can implement like this, there are other methods as well like creating decision table . Check your use case and then decide the approach.&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1650524536479v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question related to print the array</title><link>https://community.appian.com/thread/93919?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 06:24:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4fd8d2c0-0e67-4c9f-8b48-170614e1f5d5</guid><dc:creator>pd0001</dc:creator><description>&lt;p&gt;Hi gopalk, I am still not able to solve 2nd problem when i am choosing input from 2nd array via rule input then it should print from array 1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question related to print the array</title><link>https://community.appian.com/thread/93913?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 05:08:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:931c54ae-180b-4f29-81e6-536ac1c3401f</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/pd0001"&gt;pd0001&lt;/a&gt;, for your first question my solution would be below,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!arr : {&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;,&amp;quot;c&amp;quot;,&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;d&amp;quot;},
  a!forEach(
    items: union(local!arr,local!arr),
    expression: joinarray(repeat(fv!index,fv!item))
    )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and for your second question , you can use the latest function&amp;nbsp; a!match() to achieve what you want.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>