<?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>Want to Repeat an section on click of button .</title><link>https://community.appian.com/discussions/f/general/37337/want-to-repeat-an-section-on-click-of-button</link><description>Section might contain the fields like dropdown, flieupload ,.. those should also get repeated</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Want to Repeat an section on click of button .</title><link>https://community.appian.com/thread/139764?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2024 10:56:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:292d19c3-cc0b-4048-92ca-7f3e8c939bf9</guid><dc:creator>Tim</dc:creator><description>&lt;p&gt;Here&amp;#39;s a basic example, you should be able to swap in your type! values and configure your components&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!someVar,
  {
    a!forEach(
      items: local!someVar,
      expression: a!sectionLayout(
        label: &amp;quot;Section: &amp;quot; &amp;amp; fv!index,
        divider: &amp;quot;ABOVE&amp;quot;,
        contents: {
          a!textField(
            label: &amp;quot;Name&amp;quot;,
            value: fv!item.name,
            saveInto: fv!item.name
          ),
          a!dateField(
            label: &amp;quot;DoB&amp;quot;,
            value: fv!item.dob,
            saveInto: fv!item.dob
          )
        }
      )
    ),
    a!buttonArrayLayout(
      buttons: {
        a!buttonWidget(
          icon: &amp;quot;plus&amp;quot;,
          label: &amp;quot;Add Row&amp;quot;,
          value: a!map(name: null, dob: null),
          saveInto: a!save(
            target: local!someVar,
            value: append(local!someVar, save!value)
          )
        )
      }
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Want to Repeat an section on click of button .</title><link>https://community.appian.com/thread/139763?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2024 10:54:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9bdbef14-d7b6-4e20-84b3-b56faf3b83e2</guid><dc:creator>Miguel Miranda</dc:creator><description>&lt;p&gt;Hello, I&amp;#39;m not sure if this is what you are looking for but I&amp;#39;ll give it a try.&lt;/p&gt;
&lt;p&gt;I imagine you are working with an array of something, like a CDT or Record Type.&lt;/p&gt;
&lt;p&gt;What I would do is to have that array as rule input / local variable and then do a forEach() over it. Inside the forEach() you would put whatever fields you want (even as a section as you mentioned).&lt;/p&gt;
&lt;p&gt;To add more instances of that section, you&amp;#39;d create a button that would append an empty value (CDT or Record Type) to your variable. This way the fields/section is going to be repeated:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;(...)saveInto: a!save(
    ri!variable,
    append(
        ri!variable,
        type!CDT()
    )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Want to Repeat an section on click of button .</title><link>https://community.appian.com/thread/139759?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2024 10:06:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b2700243-e81a-4564-98ec-cb8c61feb1c2</guid><dc:creator>kishorej1999</dc:creator><description>&lt;p&gt;Hii &lt;a href="/members/harmanjots514"&gt;Klaus34&lt;/a&gt;&amp;nbsp;, can you&amp;nbsp;please explain more about your use case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>