<?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>Get the distinct value in each column read-only grid</title><link>https://community.appian.com/discussions/f/general/20054/get-the-distinct-value-in-each-column-read-only-grid</link><description>Column A 
 Column B 
 Column C 
 Column D 
 Column E 
 
 
 101110 
 56798 
 robert 
 xyz 
 dgh 
 
 
 101110 
 56798 
 robert 
 xyz 
 dgh 
 
 
 101114 
 78789 
 youn 
 hdg 
 dhh 
 
 
 
 above mentioned is data base table need to fetch the district value</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Get the distinct value in each column read-only grid</title><link>https://community.appian.com/thread/78402?ContentTypeID=1</link><pubDate>Wed, 09 Dec 2020 20:37:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:926053b8-7937-41a2-96a4-1a26ea55323f</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Aggregating on multiple columns will return rows with any unique combination of those 3 columns, sounds like you need to break the row associations for the data and display a list of values unrelated to the other values in the row, which does not work with multiple aggregations.&lt;/p&gt;
&lt;p&gt;The issue here will be if you have a large data set and need to apply pagingInfo, you will need to make one call to the database PER column with the grouping aggregation, then apply into a grid from 5 different data sets.&amp;nbsp; If you make one call and apply say a page size of 20, you will only get the unique values for that page.&lt;/p&gt;
&lt;p&gt;Otherwise with moderate data sets you can do something like below with one call and no paging:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;a!localVariables(
  local!data: {
    {columnA: 101110, columnB: 56789, columnC: &amp;quot;robert&amp;quot;, columnD: &amp;quot;xyz&amp;quot;,columnE: &amp;quot;dgh&amp;quot;},
    {columnA: 101110, columnB: 56789, columnC: &amp;quot;robert&amp;quot;, columnD: &amp;quot;xyz&amp;quot;,columnE: &amp;quot;dgh&amp;quot;},
    {columnA: 101114, columnB: 78789, columnC: &amp;quot;youn&amp;quot;, columnD: &amp;quot;hdg&amp;quot;,columnE: &amp;quot;dhh&amp;quot;}
  },
  local!columnA: union(local!data.columnA,local!data.columnA),
  local!columnB: union(local!data.columnB,local!data.columnB),
  local!columnC: union(local!data.columnC,local!data.columnC),
  local!columnD: union(local!data.columnD,local!data.columnD),
  local!columnE: union(local!data.columnE,local!data.columnE),
  local!max: max(count(local!columnA),count(local!columnB),count(local!columnC),count(local!columnD),count(local!columnE)),
  
  a!gridLayout(
     totalCount: local!max,
     headerCells: a!forEach(items: {&amp;quot;A&amp;quot;,&amp;quot;B&amp;quot;,&amp;quot;C&amp;quot;,&amp;quot;D&amp;quot;,&amp;quot;E&amp;quot;}, expression: a!gridLayoutHeaderCell(label: concat(&amp;quot;Column &amp;quot;,fv!item))),
     rows: a!forEach(
       items: 1+enumerate(local!max),
       expression: a!gridRowLayout(
         id: fv!index,
         contents: {
           a!textField(readOnly: true, value: index(local!columnA,fv!index,null)),
           a!textField(readOnly: true, value: index(local!columnB,fv!index,null)),
           a!textField(readOnly: true, value: index(local!columnC,fv!index,null)),
           a!textField(readOnly: true, value: index(local!columnD,fv!index,null)),
           a!textField(readOnly: true, value: index(local!columnE,fv!index,null))
         }
       )
     )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>