<?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>grouping in Grid</title><link>https://community.appian.com/discussions/f/user-interface/40000/grouping-in-grid</link><description>How can we group rows in Readonly grid</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: grouping in Grid</title><link>https://community.appian.com/thread/152705?ContentTypeID=1</link><pubDate>Fri, 05 Dec 2025 08:52:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ed564218-c1d1-4cfa-9cda-a35619f0f35b</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;Make use of aggregation in the &lt;a href="https://docs.appian.com/suite/help/25.4/fnc_system_queryrecordtype.html"&gt;queryRecordType&lt;/a&gt;(). You can use a!&lt;a href="https://docs.appian.com/suite/help/25.4/fnc_scripting_a_aggregationfields.html"&gt;aggregationFields&lt;/a&gt;() when defining the fields for querying the record.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: grouping in Grid</title><link>https://community.appian.com/thread/152688?ContentTypeID=1</link><pubDate>Thu, 04 Dec 2025 13:10:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:298f349f-2d2a-40b5-893a-a8ef252b2f6f</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;You have to aggregate data.&lt;br /&gt;Hope you are expecting similar..&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!employees: {
    a!map(name: &amp;quot;John&amp;quot;, jobType: &amp;quot;Software&amp;quot;, salary: 50000),
    a!map(name: &amp;quot;Sarah&amp;quot;, jobType: &amp;quot;Software&amp;quot;, salary: 60000),
    a!map(name: &amp;quot;Mike&amp;quot;, jobType: &amp;quot;Testing&amp;quot;, salary: 45000),
    a!map(name: &amp;quot;Lisa&amp;quot;, jobType: &amp;quot;Testing&amp;quot;, salary: 55000),
    a!map(name: &amp;quot;Tom&amp;quot;, jobType: &amp;quot;Management&amp;quot;, salary: 70000),
    a!map(name: &amp;quot;Emma&amp;quot;, jobType: &amp;quot;Management&amp;quot;, salary: 65000)
  },

  /* Get unique job types */
  local!uniqueJobTypes: union(local!employees.jobType, local!employees.jobType),

  /* Aggregate data by Job Type */
  local!aggregatedData: a!forEach(
    items: local!uniqueJobTypes,
    expression: a!localVariables(
      local!currentJobType: fv!item,
      local!filteredEmployees: a!forEach(
        items: local!employees,
        expression: if(fv!item.jobType = local!currentJobType, fv!item, null)
      ),
      local!validEmployees: reject(fn!isnull, local!filteredEmployees),
      a!map(
        jobType: local!currentJobType,
        employeeNames: joinarray(local!validEmployees.name, &amp;quot;, &amp;quot;),
        totalSalary: sum(local!validEmployees.salary),
        employeeCount: count(local!validEmployees)
      )
    )
  ),

  a!gridField(
    label: &amp;quot;Employees Grouped by Job Type&amp;quot;,
    data: local!aggregatedData,
    columns: {
      a!gridColumn(
        label: &amp;quot;Job Type&amp;quot;,
        value: fv!row.jobType
      ),
      a!gridColumn(
        label: &amp;quot;Employees&amp;quot;,
        value: fv!row.employeeNames
      ),
      a!gridColumn(
        label: &amp;quot;Count&amp;quot;,
        value: fv!row.employeeCount
      ),
      a!gridColumn(
        label: &amp;quot;Total Salary&amp;quot;,
        value: fv!row.totalSalary
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: grouping in Grid</title><link>https://community.appian.com/thread/152687?ContentTypeID=1</link><pubDate>Thu, 04 Dec 2025 12:48:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:515fd05b-2719-469b-b624-034ccbab55b3</guid><dc:creator>meharunnisas068858</dc:creator><description>&lt;p&gt;assume that I have a field - Job Type&amp;nbsp; for that field I have values Software for 2 rows then I need group that two rows into single row&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: grouping in Grid</title><link>https://community.appian.com/thread/152684?ContentTypeID=1</link><pubDate>Thu, 04 Dec 2025 11:55:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ef6b5e8e-1421-42c8-a4d3-9dfceccd8666</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;You can group the data before passing it in DB or in expression.&lt;br /&gt;Or &lt;br /&gt;You expecting something different?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>