<?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>add grid automatically</title><link>https://community.appian.com/discussions/f/general/25857/add-grid-automatically</link><description>Hi 
 my requirements is i have 2 grids one after the other when i add a row in the first grid i have to get one row automatically in the 2nd grid [second grid will be user input grid] 
 can anyone help me on this</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: add grid automatically</title><link>https://community.appian.com/thread/101586?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2022 10:02:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:47e3c22b-a406-41df-b9a1-d2b551949042</guid><dc:creator>ujjwalr0002</dc:creator><description>&lt;p&gt;Check this out..&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;= a!localVariables(
  local!items: { { item: null, qty: null, unitPrice: null },  },
  local!item2: { { item_grid: null, item_qty: null } },
  {
    a!gridLayout(
      label: &amp;quot;Products1&amp;quot;,
      instructions: &amp;quot;Update the item name, quantity, or unit price.&amp;quot;,
      headerCells: {
        a!gridLayoutHeaderCell(label: &amp;quot;Item&amp;quot;),
        a!gridLayoutHeaderCell(label: &amp;quot;Qty&amp;quot;),
        a!gridLayoutHeaderCell(label: &amp;quot;Unit Price&amp;quot;),
        
      },
      rows: a!forEach(
        items: local!items,
        expression: {
          a!gridRowLayout(
            contents: {
              a!textField(
                value: fv!item.item,
                saveInto: fv!item.item
              ),
              a!integerField(value: fv!item.qty, saveInto: fv!item.qty),
              a!floatingPointField(
                value: fv!item.unitPrice,
                saveInto: fv!item.unitPrice
              ),
              
            }
          )
        }
      ),
      rowHeader: 1,
      addRowLink: a!dynamicLink(
        label: &amp;quot;Add new row&amp;quot;,
        saveInto: {
          a!save(
            local!items,
            append(
              local!items,
              { item: null, qty: null, unitPrice: null }
            )
          ),
          a!save(
            local!item2,
            append(
              local!item2,
              { item_grid: null, item_qty: null }
            )
          )
        }
      )
    ),
    a!gridLayout(
      label: &amp;quot;Products2&amp;quot;,
      instructions: &amp;quot;Update the item name, quantity, or unit price.&amp;quot;,
      headerCells: {
        a!gridLayoutHeaderCell(label: &amp;quot;Item&amp;quot;),
        a!gridLayoutHeaderCell(label: &amp;quot;Qty&amp;quot;),
        
      },
      rows: a!forEach(
        items: local!item2,
        expression: {
          a!gridRowLayout(
            contents: {
              a!textField(
                value: fv!item.item_grid,
                saveInto: fv!item.item_grid
              ),
              a!integerField(
                value: fv!item.item_qty,
                saveInto: fv!item.item_qty
              ),
              
            }
          )
        }
      ),
      rowHeader: 1,
      addRowLink: a!dynamicLink(
        label: &amp;quot;Add new row&amp;quot;,
        saveInto: {
          a!save(
            local!item2,
            append(
              local!item2,
              { item_grid: null, item_qty: null }
            )
          ),
          a!save(
            local!items,
            append(
              local!items,
              { item: null, qty: null, unitPrice: null }
            )
          )
        }
      )
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add grid automatically</title><link>https://community.appian.com/thread/101585?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2022 09:53:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cd955eda-0530-4075-844f-eb933e0af6ea</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Try to ignore the grids and concentrate on manipulating the underlying data stored in rule inputs or locals.&lt;/p&gt;
&lt;p&gt;Please try to explain what you tried and what failed. Do you have some code snippets you can share?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add grid automatically</title><link>https://community.appian.com/thread/101584?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2022 09:02:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9ac470c3-bbee-4bf0-9625-85680c538500</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;Hi Ujjwal,&lt;/p&gt;
&lt;p&gt;can you help me with the sample code so that it will&amp;nbsp; be helpful for me. i have tried but not getting&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add grid automatically</title><link>https://community.appian.com/thread/101136?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2022 06:12:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d4f7d3b1-ab13-43da-b5e5-9047d31bea71</guid><dc:creator>puneets0004</dc:creator><description>&lt;p&gt;Hi, please refer to the below link for your reference.&lt;br /&gt;&lt;a href="https://docs.appian.com/suite/help/20.4/recipe-add-edit-and-remove-data-in-an-inline-editable-grid.html"&gt;docs.appian.com/.../recipe-add-edit-and-remove-data-in-an-inline-editable-grid.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add grid automatically</title><link>https://community.appian.com/thread/101132?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2022 05:46:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:65c96147-fc19-4ba0-8223-dc3ff271402f</guid><dc:creator>ujjwalr0002</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;While using the editable grids we have a parameter as&amp;nbsp;&lt;strong&gt;&lt;em&gt;addRowLink&lt;/em&gt;&lt;/strong&gt; there you can append new values to both the items which you are using for the&lt;i&gt;&amp;nbsp;&lt;/i&gt;grids.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add grid automatically</title><link>https://community.appian.com/thread/101126?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2022 04:50:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b7b37b1b-0e65-4bd2-bc63-7e3969c21c5a</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;can you please give snippet of it that would be helpful&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add grid automatically</title><link>https://community.appian.com/thread/101106?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2022 15:40:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:48e54234-e52d-4720-86e1-65062ca37c28</guid><dc:creator>deepakg681722</dc:creator><description>&lt;p&gt;While adding the row in the first grid from the dynamic link. on click, append 1 row to the second grid variable as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add grid automatically</title><link>https://community.appian.com/thread/101097?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2022 13:14:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82ec07eb-bc28-455d-8984-8e2a61fd654c</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;This depends to a great extent on details you haven&amp;#39;t provided here - your data structure, the nature of the relationship between corresponding rows on both grids, etc.&lt;/p&gt;
&lt;p&gt;In general I can offer this: the &amp;quot;add row&amp;quot; link in an editable grid can do &lt;em&gt;&lt;strong&gt;basically anything you want&lt;/strong&gt;&lt;/em&gt;, as a DynamicLink.&amp;nbsp; That includes the ability to add new/blank rows to two separate arrays at the same time, just as a more concrete hint.&amp;nbsp; That&amp;#39;s true regardless of whether the arrays are stored in local variables, or in Rule Inputs (or a mixture of both).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add grid automatically</title><link>https://community.appian.com/thread/101095?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2022 12:56:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3cbedaf3-879b-4e12-b15a-2e13b6ea833b</guid><dc:creator>Durgesh Kahar</dc:creator><description>&lt;p&gt;I hope you are storing the data in local variable, in this case, set the refreshAfter attribute on a local variable&amp;nbsp;which is used to populate the second grid.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>