<?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>gridLayout: Unable to save selected rows in gridRowLayout to a local variable</title><link>https://community.appian.com/discussions/f/general/37485/gridlayout-unable-to-save-selected-rows-in-gridrowlayout-to-a-local-variable</link><description>Hi everyone, 
 Please help check whether I&amp;#39;m doing anything wrong in below code. I&amp;#39;m having an editable grid with data source is a data subset local variable. In gridRowLayout I already provided the id for identifying, and save the selected ID into a</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: gridLayout: Unable to save selected rows in gridRowLayout to a local variable</title><link>https://community.appian.com/thread/143224?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2024 05:45:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:03e23757-7ed1-407c-a032-39ee89c80833</guid><dc:creator>Vyshnavi Naripeddi</dc:creator><description>&lt;p&gt;The issue in the first code is on line 36, where you&amp;#39;re using the &lt;code&gt;DateText&lt;/code&gt; function. The &lt;a href="https://docs.appian.com/suite/help/24.4/fnc_scripting_datetext.html"&gt;&lt;code&gt;DateText&lt;/code&gt; &lt;/a&gt;function converts a date or datetime into a string. If you use the t&lt;code&gt;ext()&lt;/code&gt; function instead This will work as expected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gridLayout: Unable to save selected rows in gridRowLayout to a local variable</title><link>https://community.appian.com/thread/143223?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2024 05:31:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:44e88761-f2f7-4264-bddb-1d98b30db798</guid><dc:creator>mollyn126</dc:creator><description>&lt;p&gt;I finally found the issue, it is a long story how I traced it down, but if you try this simplified code you will understand the situation:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: &amp;#39;type!{http://www.appian.com/ae/types/2009}DataSubset&amp;#39;(
    &amp;#39;startIndex&amp;#39;: 1,
    &amp;#39;batchSize&amp;#39;: 10,
    &amp;#39;sort&amp;#39;: { null },
    &amp;#39;totalCount&amp;#39;: 10,
    &amp;#39;data&amp;#39;: {
      {
        fileId: &amp;quot;123&amp;quot;
      },
      { fileId: &amp;quot;456&amp;quot; }
    },
    &amp;#39;identifiers&amp;#39;: {
      &amp;quot;123&amp;quot;,
      &amp;quot;456&amp;quot;
    }
  ),
  local!selectedAzureIds,
  a!gridLayout(
    label: &amp;quot;Documents&amp;quot;,
    labelPosition: &amp;quot;COLLAPSED&amp;quot;,
    headerCells: { a!gridLayoutHeaderCell(align: &amp;quot;CENTER&amp;quot;) },
    columnConfigs: { a!gridLayoutColumnConfig(weight: 4) },
    rows: a!forEach(
      items: local!data.data,
      expression: a!gridRowLayout(
        id: fv!item.fileId,
        contents: {
          a!richTextDisplayField(
            value: {
              a!richTextIcon(
                icon: &amp;quot;download&amp;quot;,
                size: &amp;quot;MEDIUM&amp;quot;,
                color: &amp;quot;ACCENT&amp;quot;,
                linkStyle: &amp;quot;STANDALONE&amp;quot;,
                link: a!safeLink(uri: datetext(now(), &amp;quot;yyyymmddHms&amp;quot;))
              )
            },
            align: &amp;quot;CENTER&amp;quot;
          )
        }
      )
    ),
    selectable: true,
    selectionValue: local!selectedAzureIds,
    selectionSaveInto: {
      a!save(local!selectedAzureIds, save!value),

    },
    rowHeader: 1
  )
),&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And this is how I fixed it, just wrap the URL link into a local variable and use its output&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: &amp;#39;type!{http://www.appian.com/ae/types/2009}DataSubset&amp;#39;(
    &amp;#39;startIndex&amp;#39;: 1,
    &amp;#39;batchSize&amp;#39;: 10,
    &amp;#39;sort&amp;#39;: { null },
    &amp;#39;totalCount&amp;#39;: 10,
    &amp;#39;data&amp;#39;: {
      {
        fileId: &amp;quot;123&amp;quot;
      },
      { fileId: &amp;quot;456&amp;quot; }
    },
    &amp;#39;identifiers&amp;#39;: {
      &amp;quot;123&amp;quot;,
      &amp;quot;456&amp;quot;
    }
  ),
  local!selectedAzureIds,
  a!gridLayout(
    label: &amp;quot;Documents&amp;quot;,
    labelPosition: &amp;quot;COLLAPSED&amp;quot;,
    headerCells: { a!gridLayoutHeaderCell(align: &amp;quot;CENTER&amp;quot;) },
    columnConfigs: { a!gridLayoutColumnConfig(weight: 4) },
    rows: a!forEach(
      items: local!data.data,
      expression: a!gridRowLayout(
        id: fv!item.fileId,
        contents: {
          a!richTextDisplayField(
            value: {
              a!richTextIcon(
                icon: &amp;quot;download&amp;quot;,
                size: &amp;quot;MEDIUM&amp;quot;,
                color: &amp;quot;ACCENT&amp;quot;,
                linkStyle: &amp;quot;STANDALONE&amp;quot;,
                link: a!safeLink(uri: a!localVariables(
                  local!url: datetext(now(), &amp;quot;yyyymmddHms&amp;quot;),
                  local!url))
              )
            },
            align: &amp;quot;CENTER&amp;quot;
          )
        }
      )
    ),
    selectable: true,
    selectionValue: local!selectedAzureIds,
    selectionSaveInto: {
      a!save(local!selectedAzureIds, save!value),

    },
    rowHeader: 1
  )
),&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Even though I was able to fix it, I still don&amp;#39;t know why it does not work, if someone can explain me that would be great :/&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gridLayout: Unable to save selected rows in gridRowLayout to a local variable</title><link>https://community.appian.com/thread/143204?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2024 11:38:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:976dff9f-fe92-4373-aa89-f64187630f83</guid><dc:creator>Vyshnavi Naripeddi</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/mollyn6512"&gt;mollyn126&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;I tried the same and it seems to be working for me.&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/11/pastedimage1732793647735v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The data is returning &amp;quot;2&amp;quot; items, but the total count is showing &amp;quot;10&amp;quot;. Are there any conditions being applied in the local variables that could be affecting this?&lt;/p&gt;
&lt;p&gt;Could you please provide the relevant code snippet to help us understand the situation better?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gridLayout: Unable to save selected rows in gridRowLayout to a local variable</title><link>https://community.appian.com/thread/143072?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2024 10:04:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f78dca85-addf-4477-9299-d14729a94520</guid><dc:creator>gayatria0439</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="/members/mollyn6512"&gt;mollyn126&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;I am unable to see your complete code, particularly in areas such as the expression under the gridRowLayout, as some content appears to have been minimized in the screenshot you provided. I hope you have found a solution to this. If not, I am attaching the code below for your reference. Please review it at your convenience. (Regarding the Id and data, you can use either fv!item.id or fv!index and index or .data)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1732529238513v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>