<?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>Using local variable to add a section calling another interface on a button click</title><link>https://community.appian.com/discussions/f/user-interface/25860/using-local-variable-to-add-a-section-calling-another-interface-on-a-button-click</link><description>I had created an interface that calls another interface. Also, I had created a counter as a local variable that is incremented by 1 every time a button in the interface is pressed. On every button press I want to add a new section that calls the child</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Using local variable to add a section calling another interface on a button click</title><link>https://community.appian.com/thread/101113?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2022 17:06:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1f39b02a-9d4e-4a84-b6d7-ae661c30e746</guid><dc:creator>khaleda0073</dc:creator><description>&lt;p&gt;thanks a lot it worked. But a problem is still happening which is that the content of the textfield at the end of the code appears in all the called instances and once updated in one of the textfields it updates all of the&amp;nbsp;others so do you have a solution for that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using local variable to add a section calling another interface on a button click</title><link>https://community.appian.com/thread/101105?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2022 15:35:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:31525f3d-8892-4577-a422-588709950c13</guid><dc:creator>Dharsana</dc:creator><description>&lt;p&gt;Try this&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;a!localVariables(&lt;br /&gt; local!count: 1,&lt;br /&gt; {&lt;br /&gt; a!sectionLayout(&lt;br /&gt; label: &amp;quot;Click the button to add a new Customer Currency section&amp;quot;,&lt;br /&gt; contents: {&lt;br /&gt; a!buttonArrayLayout(&lt;br /&gt; buttons: {&lt;br /&gt; a!buttonWidget(&lt;br /&gt; label: &amp;quot;Add new section below&amp;quot;,&lt;br /&gt; icon: &amp;quot;plus-circle&amp;quot;,&lt;br /&gt; value: local!count + 1,&lt;br /&gt; saveInto: local!count,&lt;br /&gt; size: &amp;quot;SMALL&amp;quot;,&lt;br /&gt; width: &amp;quot;FILL&amp;quot;,&lt;br /&gt; style: &amp;quot;PRIMARY&amp;quot;&lt;br /&gt; )&lt;br /&gt; },&lt;br /&gt; align: &amp;quot;START&amp;quot;&lt;br /&gt; )&lt;/p&gt;
&lt;p&gt;}&lt;br /&gt; ),&lt;br /&gt; if(local!count&amp;gt;0,&lt;br /&gt; a!foreach(&lt;br /&gt; items:enumerate(local!count)+1,&lt;br /&gt; expression:&lt;br /&gt; a!sectionLayout(&lt;br /&gt; label: &amp;quot;&amp;quot;,&lt;br /&gt; contents: {&lt;br /&gt; a!textField(&lt;br /&gt; label:&amp;quot;test&amp;quot;&lt;br /&gt; )&lt;br /&gt; }&lt;br /&gt; )),&amp;quot;&amp;quot;)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; }&lt;br /&gt; )&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>