<?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 relate to array</title><link>https://community.appian.com/discussions/f/user-interface/29273/question-relate-to-array</link><description>Hi All, I&amp;#39;ve a question relate to array. I&amp;#39;ve a array like {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18} Want to print in row and column for mat like this: 
 
 1 2 3 4 5 
 6 7 8 9 10 
 11 12 13 14 15 
 16 17 18 
 
 Currently we have 18 items. It can</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Question relate to array</title><link>https://community.appian.com/thread/116023?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2023 13:35:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:43109a17-b2d4-4cae-9314-3bcf184defbf</guid><dc:creator>Saranya Ravichandran</dc:creator><description>&lt;p&gt;In the above posted code in the local!array I have generated the array, you can simply initialize the array of integer you need and the code will work.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question relate to array</title><link>https://community.appian.com/thread/115922?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 12:12:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1ab9dd2c-a527-481c-b5b3-7c8b0be0de03</guid><dc:creator>Pawan Lalwani</dc:creator><description>&lt;p&gt;Thank you so much stefan. It helped me a lot..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question relate to array</title><link>https://community.appian.com/thread/115920?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 11:51:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5eb4d0a4-3e5e-4827-814a-404ba4afefef</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;The code I shared in my blog post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question relate to array</title><link>https://community.appian.com/thread/115917?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 11:48:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4af5c56b-79f8-4cda-aa75-89ade60ed094</guid><dc:creator>Pawan Lalwani</dc:creator><description>&lt;p&gt;what&amp;#39;s the way to make it 2 dimensional ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question relate to array</title><link>https://community.appian.com/thread/115916?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 11:46:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:35bb0445-ae64-4681-aa3a-034919a9a315</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Sure. Appian automatically merges your values into a one-dimensional list.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question relate to array</title><link>https://community.appian.com/thread/115911?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 11:03:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9eae2cd6-afae-41e2-972b-108af0f0fa07</guid><dc:creator>Pawan Lalwani</dc:creator><description>&lt;p&gt;Hi Stefan, I wrote this code to print things in above format&lt;br /&gt;&lt;br /&gt;a!localVariables(&lt;br /&gt; local!array:{{1,2,3},{4,77,88},{77,88}},&lt;br /&gt; {&lt;br /&gt; a!forEach(&lt;br /&gt; items: local!array,&lt;br /&gt; expression: a!sectionLayout(divider: &amp;quot;BELOW&amp;quot;,contents: {a!forEach(&lt;br /&gt; items: fv!item,&lt;br /&gt; expression: a!richTextDisplayField(&lt;br /&gt; value: a!richTextItem(&lt;br /&gt; text: fv!item&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; )})&lt;br /&gt; )&lt;br /&gt; &lt;br /&gt; }&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But it is giving output like this&lt;br /&gt;&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1688986973382v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question relate to array</title><link>https://community.appian.com/thread/115908?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 10:26:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:26be66da-3dcf-4680-ad97-59399db62325</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;In this blog post&lt;/p&gt;
&lt;p&gt;&lt;a href="https://appian.rocks/2022/09/19/building-customisable-components/"&gt;https://appian.rocks/2022/09/19/building-customisable-components/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I describe how to turn a list into a two-dimensional matrix. Then you can just run two nested foreach() loops to output the values in any way you like.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question relate to array</title><link>https://community.appian.com/thread/115905?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 09:52:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c6d341c2-e1d8-4b80-9014-8b61f2cf1511</guid><dc:creator>Pawan Lalwani</dc:creator><description>&lt;p&gt;umm that should not be the case. I want to pass value in array.. and suppose the array will be like this : {21,26,27,28,30,36,1,2,5,199,200}..&lt;br /&gt;Then it will not work&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question relate to array</title><link>https://community.appian.com/thread/115896?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 08:29:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:80256cb3-1617-4321-a4e4-2a9577cc8ccf</guid><dc:creator>Saranya Ravichandran</dc:creator><description>&lt;p&gt;No, It is just integer.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question relate to array</title><link>https://community.appian.com/thread/115894?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 08:25:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b72b88d0-35eb-47d0-aa54-956e69a5430d</guid><dc:creator>Pawan Lalwani</dc:creator><description>&lt;p&gt;type of input is integer array ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question relate to array</title><link>https://community.appian.com/thread/115892?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 08:19:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f02c1d58-047c-4cf6-b260-c6353106baa2</guid><dc:creator>Saranya Ravichandran</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!array: enumerate(ri!input) + 1,
  local!cardsPerRow: 5,
  local!numOfRows: tointeger(
    ceiling(
      count(local!array) / local!cardsPerRow,
      .5
    )
  ),
 a!columnLayout(
      contents: {
        a!forEach(
          items: enumerate(local!numOfRows) + 1,
          expression: a!localVariables(
            local!rowIndex: fv!index,
            a!columnsLayout(
              columns: a!forEach(
                items: enumerate(local!cardsPerRow) + 1,
                expression: a!localVariables(
                  local!colIndex: local!cardsPerRow * local!rowIndex - local!cardsPerRow + fv!index,
                  local!entityIdForColIndex: index(local!array, local!colIndex, null()),
                  a!columnLayout(
                    contents: a!richTextDisplayField(
                      value: a!richTextItem(
                        text: index(
                          local!array,
                          local!entityIdForColIndex,
                          null()
                        )
                      )
                    )
                  )
                )
              )
            )
          )
        )
      }
    )
  
)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I think the above code will work dynamically for your requirement.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question relate to array</title><link>https://community.appian.com/thread/115891?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 08:13:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4e871b7f-9e6e-4587-8722-5da5430f95cf</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Just use two nested foreach loops, just like in any other programming language. Give it a try, and we can help you in case you have a specific question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>