<?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 create custom grid</title><link>https://community.appian.com/discussions/f/new-to-appian/22027/how-to-create-custom-grid</link><description>Hi, 
 I have a requirement to create a grid something like the one below : 
 first row first column has one cell, first row second column has two cells and first row third column has two cells. 
 
 
 
 
 Date 
 
 
 Name 
 
 
 Code 
 
 
 
 
 Monday September</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to create custom grid</title><link>https://community.appian.com/thread/86628?ContentTypeID=1</link><pubDate>Mon, 04 Oct 2021 18:42:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dcb66575-c1d4-4a2c-b827-6e733d1759ac</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The primary reason for using local data in the above sample code is for ease of portability (i.e. anyone here can copy/paste that into their interface designer and see what i did, as long as they have a reasonably modern version of Appian).&amp;nbsp; In a normal use case data would be coming from the database, but the above example would still work pending adjustments to account for the particular configuration of your data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create custom grid</title><link>https://community.appian.com/thread/86627?ContentTypeID=1</link><pubDate>Mon, 04 Oct 2021 18:24:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:32299b22-ee6c-4e65-b9d8-646d8af870b6</guid><dc:creator>shubhamy0001</dc:creator><description>&lt;p&gt;Hi Mike,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for the explanation. But my data is coming from database view insted of local array. However I tried to use the above code but it does not seem to work in grid. Could you please suggest on this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create custom grid</title><link>https://community.appian.com/thread/86209?ContentTypeID=1</link><pubDate>Mon, 27 Sep 2021 13:14:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5f4d6106-7160-4669-9dd7-9a1f385302c6</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;There&amp;#39;s no exact solution for this available in base Appian.&amp;nbsp; My first approach would be to build a Read-Only Grid where the Name and Code column values are Rich Text, and iterate over all the values that belong in that primary row, separating them with line returns.&amp;nbsp; There are other possible &amp;quot;approximate&amp;quot; approaches too, like perhaps building a quasi-grid using stacked Cards, etc.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a &amp;quot;portable&amp;quot; example of my primary suggestion above, using your example data structure:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!array: {
    a!map(
      date: today() - 5,
      people: {
        a!map(name: &amp;quot;Dave&amp;quot;, code: 1122),
        a!map(name: &amp;quot;Frank&amp;quot;, code: 1133)
      }
    ),
    a!map(
      date: today() - 4,
      people: {
        a!map(name: &amp;quot;Maria&amp;quot;, code: 3322),
        a!map(name: &amp;quot;John&amp;quot;, code: 1324),
        a!map(name: &amp;quot;Joe&amp;quot;, code: 3444)
      }
    ),
    a!map(
      date: today() - 3,
      people: { a!map(name: &amp;quot;Adam&amp;quot;, code: 3432) }
    )
  },
  a!gridField(
    data: local!array,
    spacing: &amp;quot;DENSE&amp;quot;,
    columns: {
      a!gridColumn(
        label: &amp;quot;Date&amp;quot;,
        sortField: &amp;quot;date&amp;quot;,
        value: fv!row.date
      ),
      a!gridColumn(
        label: &amp;quot;Name&amp;quot;,
        value: a!richTextDisplayField(
          value: {
            a!forEach(
              fv!row.people,
              fv!item.name &amp;amp; if(fv!isLast, &amp;quot;&amp;quot;, char(10))
            )
          }
        )
      ),
      a!gridColumn(
        label: &amp;quot;Code&amp;quot;,
        value: a!richTextDisplayField(
          value: {
            a!forEach(
              fv!row.people,
              fv!item.code &amp;amp; if(fv!isLast, &amp;quot;&amp;quot;, char(10))
            )
          }
        )
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1632749391463v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>