<?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>Repeat row data based on countcolumn</title><link>https://community.appian.com/discussions/f/general/28242/repeat-row-data-based-on-countcolumn</link><description>Hi Expert, 
 I have made a expression rule which is returning datasubset . 
 For eg: This is my query entity returning data. 
 Col A Col B Countcolumn 
 a b 2 
 d e 3 
 g h 1 
 Now i want to repeat row based on count column.How can i achieve following</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Repeat row data based on countcolumn</title><link>https://community.appian.com/thread/110320?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2023 02:48:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b9cdb57e-42bc-41ca-84d1-eb09dbdd07f7</guid><dc:creator>Ankit Tewari</dc:creator><description>&lt;p&gt;Thanks sanchit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Repeat row data based on countcolumn</title><link>https://community.appian.com/thread/110319?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2023 02:47:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:41267047-5751-437a-9408-342a8e1af3b2</guid><dc:creator>Ankit Tewari</dc:creator><description>&lt;p&gt;Thanks Stefan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Repeat row data based on countcolumn</title><link>https://community.appian.com/thread/110304?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2023 18:54:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3083083d-f7a3-415d-a683-c09da9070835</guid><dc:creator>sanchitg0002</dc:creator><description>&lt;p&gt;Like Stefan mentioned, nested forEach will do the trick&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: {
    { col1: &amp;quot;A&amp;quot;, col2: &amp;quot;B&amp;quot;, count: 4 },
    { col1: &amp;quot;C&amp;quot;, col2: &amp;quot;D&amp;quot;, count: 2 }
  },
  a!flatten(
    a!forEach(
      items: local!data,
      expression: a!localVariables(
        local!col1: fv!item.col1,
        local!col2: fv!item.col2,
        local!count: fv!item.count,
        a!forEach(
          items: enumerate(local!count),
          expression: { col1: local!col1, col2: local!col2 }
        )
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Repeat row data based on countcolumn</title><link>https://community.appian.com/thread/110300?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2023 17:56:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7095d0fd-16f2-4f3d-a939-056c89b78fa1</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Two nested foreach loop should do that. The outer one on the rows, and the inner one on that count column.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>