<?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>Grid columns align into vertically</title><link>https://community.appian.com/discussions/f/user-interface/21231/grid-columns-align-into-vertically</link><description>Hi 
 
 I have table with fields of school 1, school 2, school 3...... school 10 and 
 value1,value2,value3,value4,value5.......value10 fields and 
 remark1,remark2,remark3....remark10 
 
 so I need to display school 1 to school 10 fields data under &amp;quot;schools</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Grid columns align into vertically</title><link>https://community.appian.com/thread/82768?ContentTypeID=1</link><pubDate>Sat, 19 Jun 2021 19:16:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7c908cb9-f35f-4e1f-a3fd-1c2ef8fa6a8d</guid><dc:creator>devi</dc:creator><description>&lt;p&gt;&lt;span&gt;Thanks a lot&lt;/span&gt;.&lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grid columns align into vertically</title><link>https://community.appian.com/thread/82765?ContentTypeID=1</link><pubDate>Fri, 18 Jun 2021 18:52:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:828a6c01-ef80-4696-9b3d-c5b6cd19cfa5</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I suspect this won&amp;#39;t be easy but should be doable with some on-form transformation work.&amp;nbsp; Assuming the fields always start with the number &amp;quot;1&amp;quot; and iterate evenly through to &amp;quot;10&amp;quot; (though it could be more or less), you could use the &lt;em&gt;&lt;strong&gt;property()&lt;/strong&gt;&lt;/em&gt; function to manually pass in a field number and extract the matching property i.e. property(local!myQuery, &amp;quot;school&amp;quot; &amp;amp; fv!index), if you loop over an array containing the numbers 1 - 10, would give the subsequent field properties.&amp;nbsp; You would use this to assemble a local dictionary/map containing the values ordered in a way that a!gridField() can make use of, and then you would just pass that local variable into the &lt;em&gt;data:&lt;/em&gt; parameter.&lt;/p&gt;
&lt;p&gt;Edit: here is a demonstration (in my case it&amp;#39;s just 2 numbered columns per header &amp;quot;type&amp;quot;, but it can easily be extended to more)...&lt;br /&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!testQuery: {
    school1: &amp;quot;university of maryland&amp;quot;,
    school2: &amp;quot;george mason&amp;quot;,

    value1: &amp;quot;1234&amp;quot;,
    value2: &amp;quot;5678&amp;quot;,

    remark1: &amp;quot;Go Terps&amp;quot;,
    remark2: &amp;quot;Bulldogs&amp;quot;
  },

  local!numColumns: 2,

  local!transformedData: a!forEach(
    enumerate(local!numColumns),
    a!map(
      school: property(local!testQuery, &amp;quot;school&amp;quot; &amp;amp; fv!index),
      value: property(local!testQuery, &amp;quot;value&amp;quot; &amp;amp; fv!index),
      remark: property(local!testQuery, &amp;quot;remark&amp;quot; &amp;amp; fv!index)
    )
  ),

  a!gridField(
    data: local!transformedData,
    columns: {
      a!gridColumn(
        label: &amp;quot;School&amp;quot;,
        value: fv!row.school
      ),
      a!gridColumn(
        label: &amp;quot;Value&amp;quot;,
        value: fv!row.value
      ),
      a!gridColumn(
        label: &amp;quot;Remark&amp;quot;,
        value: fv!row.remark
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Result:&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1624046567201v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>