<?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>Unable to save selected rows in gridRowLayout to a local variable</title><link>https://community.appian.com/discussions/f/user-interface/37487/unable-to-save-selected-rows-in-gridrowlayout-to-a-local-variable</link><description>Hi everyone, 
 I need help checking whether I’m doing something wrong with my code. 
 I’m having an editable grid with data is a data subset local variable. In it’s gridRowLayout() I also provided the id parameter. But somehow when selecting the row,</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Unable to save selected rows in gridRowLayout to a local variable</title><link>https://community.appian.com/thread/140534?ContentTypeID=1</link><pubDate>Thu, 12 Sep 2024 06:17:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:45bcfaad-5259-4007-9e96-e530e4918770</guid><dc:creator>Prasanta Paul</dc:creator><description>&lt;p&gt;Can you please tell me, is your code is working without configuring &amp;quot;headerCells&amp;quot; and &amp;quot;contents&amp;quot; parameters ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to save selected rows in gridRowLayout to a local variable</title><link>https://community.appian.com/thread/140531?ContentTypeID=1</link><pubDate>Thu, 12 Sep 2024 04:37:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:09fef1bd-6c17-47c5-a949-2f7cbb4c5bc7</guid><dc:creator>sarathkumar13</dc:creator><description>&lt;p&gt;Did you try using append function while saving save!value to the local!selectedAzureIds. Something like this&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;a!save(
         local!selectedAzureIds,
         append(local!selectedAzureIds,save!value)
       )&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to save selected rows in gridRowLayout to a local variable</title><link>https://community.appian.com/thread/140495?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2024 03:50:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6e35d197-9e70-4fb9-a3ff-164356d72062</guid><dc:creator>mollyn126</dc:creator><description>&lt;p&gt;I don&amp;#39;t think it is typo. If I use that id for the row content it works...&lt;br /&gt;Just found out if I click check all boxes, I can see the id stored into the local variable, so it does not work only when I choose a single row @@&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/13/pastedimage1726026586315v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to save selected rows in gridRowLayout to a local variable</title><link>https://community.appian.com/thread/140491?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2024 20:51:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:18ac130a-500a-444a-8726-0ec3682018c6</guid><dc:creator>sugasanr300208</dc:creator><description>&lt;p&gt;i am assuming you have intentionally removed the&amp;nbsp;headerCells and content of. a!gridRowLayout .&lt;/p&gt;
&lt;p&gt;check if there is typo in the fv!item.fileId . not sure why fv!index didnt work out for you. Below code worked.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: todatasubset({
    {fileId: 1, qty: 1, unitPrice: 10},
    {fileId: 2, qty: 2, unitPrice: 20}
  }),
  local!selectedAzureIds:tointeger({}),
  {
    a!gridLayout(
      label: &amp;quot;Documents&amp;quot;,
      labelPosition: &amp;quot;COLLAPSED&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;),
        a!gridLayoutHeaderCell(label: &amp;quot;Total&amp;quot;, align: &amp;quot;RIGHT&amp;quot;)
      },
      columnConfigs: {},
      rows: a!forEach(
        items: local!data.data,
        expression: a!gridRowLayout(
          id: fv!item.fileId,
          contents: {
            
              a!textField(
                value: fv!item.fileId,
                saveInto: fv!item.fileId
              ),
              a!integerField(
                value: fv!item.qty,
                saveInto: fv!item.qty
              ),
              a!floatingPointField(
                value: fv!item.unitPrice,
                saveInto: fv!item.unitPrice
              ),
              a!textField(
                value: a!currency(
                  isoCode: &amp;quot;USD&amp;quot;,
                  value: tointeger(fv!item.qty) * todecimal(fv!item.unitPrice)
                ),
                readOnly: true,
                align: &amp;quot;RIGHT&amp;quot;
              )
          }
        )
      ),
      selectable: true,
      selectionValue: local!selectedAzureIds,
      selectionSaveInto: {
        a!save(
          local!selectedAzureIds,
          a!flatten(save!value)
        ),
        

      },
      rowHeader: 1,
      

    ),}
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>