<?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>Fetch Total count Editable Grid</title><link>https://community.appian.com/discussions/f/user-interface/37285/fetch-total-count-editable-grid</link><description>I have a editable grid,and I am using totalcount:count(local!data) to show no. of rows in a gridlayout ,but for example I am removing any row from grid it is still showing same count value but I want it to be dynamic based on number of rows added and</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Fetch Total count Editable Grid</title><link>https://community.appian.com/thread/139560?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 07:08:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a0ea1ff8-6a72-4477-a7b9-032ab3b44013</guid><dc:creator>mohiniv1048</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;a href="/members/bajib0001"&gt;baji mekala&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;,I was making mistake while updating the local variable,when I was removing a row it was not getting removed from the local variable instead it was just updating isActive as false.I fixed the code.Thankyou&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fetch Total count Editable Grid</title><link>https://community.appian.com/thread/139558?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 06:39:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:205f3e06-aa4b-4aa9-ace5-3c2851135800</guid><dc:creator>mohiniv1048</dc:creator><description>&lt;p&gt;&lt;span&gt;HiKonduru Chaitanya&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;,yes there was issue in the saveInto part of remove action,I was making mistake while updating the local variable,when I was removing a row after clicking cross link, it was not getting removed from the local variable instead it was just updating isActive as false.I fixed the code.Thankyou&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fetch Total count Editable Grid</title><link>https://community.appian.com/thread/139557?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 06:37:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1c71de6d-f02d-489f-b77c-97501915e522</guid><dc:creator>mohiniv1048</dc:creator><description>&lt;p&gt;&lt;span&gt;HI &lt;a href="/members/vedant.ambarkar"&gt;Vedant Ambarkar&lt;/a&gt;&amp;nbsp;,yes I was making mistake while updating the local variable,when I was removing a row after clicking cross link, it was not getting removed from the local variable instead it was just updating isActive as false.I fixed the code.Thankyou&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fetch Total count Editable Grid</title><link>https://community.appian.com/thread/139556?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 06:36:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:73a24cf2-3652-4aab-a7de-c8fef1d310ed</guid><dc:creator>mohiniv1048</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/peter.lewis"&gt;Peter Lewis&lt;/a&gt;&amp;nbsp;,yes I was making mistake while updating the local variable,when I was removing a row it was not getting removed from the local variable instead it was just updating isActive as false.I fixed the code.Thankyou&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fetch Total count Editable Grid</title><link>https://community.appian.com/thread/139525?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 16:18:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ab124a51-ef88-4d4c-8e1a-78ace2277e20</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;&lt;a href="/members/mohiniv1048"&gt;mohiniv1048&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As others have mentioned, Please share your code snippet, so that we will understand what are you trying to do in the saveInto of the remove action.&lt;/p&gt;
&lt;p&gt;Also make sure your data that is being used in the grid and the remove actions saveInto reflect the same variable. Your count will be displayed only when the total number of rows in your data are more than or equal to Five.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fetch Total count Editable Grid</title><link>https://community.appian.com/thread/139520?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 15:28:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5460ada8-b1a6-4ca6-b426-2f6c87e3d5e6</guid><dc:creator>Vedant Ambarkar</dc:creator><description>&lt;p&gt;&lt;span&gt;As long as the added/removed rows are altering local!data directly, your totalCount should be updated dynamically as well. It might have something to do with how you have configured addRowLink. As Peter mentioned, it&amp;#39;s difficult to tell what needs fixing without looking at the expression.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fetch Total count Editable Grid</title><link>https://community.appian.com/thread/139514?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 14:28:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:021b6def-0708-4bfc-ac6f-95e10fb25ca2</guid><dc:creator>baji mekala</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/mohiniv1048"&gt;mohiniv1048&lt;/a&gt;&amp;nbsp;can you please try this code&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!employees: {
    a!map(
      id: 1,
      firstName: &amp;quot;John&amp;quot;,
      lastName: &amp;quot;Smith&amp;quot;,
      department: &amp;quot;Engineering&amp;quot;,
      title: &amp;quot;Director&amp;quot;,
      phoneNumber: &amp;quot;555-123-4567&amp;quot;,
      startDate: today() - 360
    ),
    a!map(
      id: 2,
      firstName: &amp;quot;Michael&amp;quot;,
      lastName: &amp;quot;Johnson&amp;quot;,
      department: &amp;quot;Finance&amp;quot;,
      title: &amp;quot;Analyst&amp;quot;,
      phoneNumber: &amp;quot;555-987-6543&amp;quot;,
      startDate: today() - 360
    ),
    a!map(
      id: 3,
      firstName: &amp;quot;Mary&amp;quot;,
      lastName: &amp;quot;Reed&amp;quot;,
      department: &amp;quot;Engineering&amp;quot;,
      title: &amp;quot;Software Engineer&amp;quot;,
      phoneNumber: &amp;quot;555-456-0123&amp;quot;,
      startDate: today() - 240
    ),
    
  },
  a!formLayout(
    label: &amp;quot;Employee Data&amp;quot;,
    contents: {
      a!gridLayout(
        totalCount: count(local!employees),
        headerCells: {
          a!gridLayoutHeaderCell(label: &amp;quot;First Name&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Last Name&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Department&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Title&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Phone Number&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Start Date&amp;quot;, align: &amp;quot;RIGHT&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;&amp;quot;)
        },
        columnConfigs: {
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2),
          a!gridLayoutColumnConfig(width: &amp;quot;ICON&amp;quot;)
        },
        rows: a!forEach(
          items: local!employees,
          expression: a!gridRowLayout(
            contents: {
              a!textField(
                label: &amp;quot;first name &amp;quot; &amp;amp; fv!index,
                value: fv!item.firstName,
                saveInto: fv!item.firstName,
                required: true
              ),
              a!textField(
                label: &amp;quot;last name &amp;quot; &amp;amp; fv!index,
                value: fv!item.lastName,
                saveInto: fv!item.lastName,
                required: true
              ),
              a!dropdownField(
                label: &amp;quot;department &amp;quot; &amp;amp; fv!index,
                placeholder: &amp;quot;-- Select -- &amp;quot;,
                choiceLabels: {
                  &amp;quot;Corporate&amp;quot;,
                  &amp;quot;Engineering&amp;quot;,
                  &amp;quot;Finance&amp;quot;,
                  &amp;quot;Human Resources&amp;quot;,
                  &amp;quot;Professional Services&amp;quot;,
                  &amp;quot;Sales&amp;quot;
                },
                choiceValues: {
                  &amp;quot;Corporate&amp;quot;,
                  &amp;quot;Engineering&amp;quot;,
                  &amp;quot;Finance&amp;quot;,
                  &amp;quot;Human Resources&amp;quot;,
                  &amp;quot;Professional Services&amp;quot;,
                  &amp;quot;Sales&amp;quot;
                },
                value: fv!item.department,
                saveInto: fv!item.department,
                required: true
              ),
              a!textField(
                label: &amp;quot;title &amp;quot; &amp;amp; fv!index,
                value: fv!item.title,
                saveInto: fv!item.title,
                required: true
              ),
              a!textField(
                label: &amp;quot;phone number &amp;quot; &amp;amp; fv!index,
                placeholder: &amp;quot;555-456-7890&amp;quot;,
                value: fv!item.phoneNumber,
                saveInto: fv!item.phoneNumber
              ),
              a!dateField(
                label: &amp;quot;start date &amp;quot; &amp;amp; fv!index,
                value: fv!item.startDate,
                saveInto: fv!item.startDate,
                required: true,
                align: &amp;quot;RIGHT&amp;quot;
              ),
              a!richTextDisplayField(
                value: a!richTextIcon(
                  icon: &amp;quot;close&amp;quot;,
                  altText: &amp;quot;delete &amp;quot; &amp;amp; fv!index,
                  caption: &amp;quot;Remove &amp;quot; &amp;amp; fv!item.firstName &amp;amp; &amp;quot; &amp;quot; &amp;amp; fv!item.lastName,
                  link: a!dynamicLink(
                    value: fv!index,
                    saveInto: {
                      a!save(
                        local!employees,
                        remove(local!employees, save!value)
                      )
                    }
                  ),
                  linkStyle: &amp;quot;STANDALONE&amp;quot;,
                  color: &amp;quot;NEGATIVE&amp;quot;
                )
              )
            },
            id: fv!index
          )
        ),
        addRowlink: a!dynamicLink(
          label: &amp;quot;Add Employee&amp;quot;,
          value: { startDate: today() + 1 },
          saveInto: {
            a!save(
              local!employees,
              append(local!employees, save!value)
            )
          }
        ),
        rowHeader: 1
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fetch Total count Editable Grid</title><link>https://community.appian.com/thread/139513?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 14:27:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:81c10e97-6c51-4bcd-a7ce-f377cc37aeae</guid><dc:creator>baji mekala</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/mohiniv1048"&gt;mohiniv1048&lt;/a&gt;&amp;nbsp;can you please try this below code may it can help you&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!employees: {
    a!map(
      id: 1,
      firstName: &amp;quot;John&amp;quot;,
      lastName: &amp;quot;Smith&amp;quot;,
      department: &amp;quot;Engineering&amp;quot;,
      title: &amp;quot;Director&amp;quot;,
      phoneNumber: &amp;quot;555-123-4567&amp;quot;,
      startDate: today() - 360
    ),
    a!map(
      id: 2,
      firstName: &amp;quot;Michael&amp;quot;,
      lastName: &amp;quot;Johnson&amp;quot;,
      department: &amp;quot;Finance&amp;quot;,
      title: &amp;quot;Analyst&amp;quot;,
      phoneNumber: &amp;quot;555-987-6543&amp;quot;,
      startDate: today() - 360
    ),
    a!map(
      id: 3,
      firstName: &amp;quot;Mary&amp;quot;,
      lastName: &amp;quot;Reed&amp;quot;,
      department: &amp;quot;Engineering&amp;quot;,
      title: &amp;quot;Software Engineer&amp;quot;,
      phoneNumber: &amp;quot;555-456-0123&amp;quot;,
      startDate: today() - 240
    ),
    
  },
  a!formLayout(
    label: &amp;quot;Employee Data&amp;quot;,
    contents: {
      a!gridLayout(
        totalCount: count(local!employees),
        headerCells: {
          a!gridLayoutHeaderCell(label: &amp;quot;First Name&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Last Name&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Department&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Title&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Phone Number&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Start Date&amp;quot;, align: &amp;quot;RIGHT&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;&amp;quot;)
        },
        columnConfigs: {
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2),
          a!gridLayoutColumnConfig(width: &amp;quot;ICON&amp;quot;)
        },
        rows: a!forEach(
          items: local!employees,
          expression: a!gridRowLayout(
            contents: {
              a!textField(
                label: &amp;quot;first name &amp;quot; &amp;amp; fv!index,
                value: fv!item.firstName,
                saveInto: fv!item.firstName,
                required: true
              ),
              a!textField(
                label: &amp;quot;last name &amp;quot; &amp;amp; fv!index,
                value: fv!item.lastName,
                saveInto: fv!item.lastName,
                required: true
              ),
              a!dropdownField(
                label: &amp;quot;department &amp;quot; &amp;amp; fv!index,
                placeholder: &amp;quot;-- Select -- &amp;quot;,
                choiceLabels: {
                  &amp;quot;Corporate&amp;quot;,
                  &amp;quot;Engineering&amp;quot;,
                  &amp;quot;Finance&amp;quot;,
                  &amp;quot;Human Resources&amp;quot;,
                  &amp;quot;Professional Services&amp;quot;,
                  &amp;quot;Sales&amp;quot;
                },
                choiceValues: {
                  &amp;quot;Corporate&amp;quot;,
                  &amp;quot;Engineering&amp;quot;,
                  &amp;quot;Finance&amp;quot;,
                  &amp;quot;Human Resources&amp;quot;,
                  &amp;quot;Professional Services&amp;quot;,
                  &amp;quot;Sales&amp;quot;
                },
                value: fv!item.department,
                saveInto: fv!item.department,
                required: true
              ),
              a!textField(
                label: &amp;quot;title &amp;quot; &amp;amp; fv!index,
                value: fv!item.title,
                saveInto: fv!item.title,
                required: true
              ),
              a!textField(
                label: &amp;quot;phone number &amp;quot; &amp;amp; fv!index,
                placeholder: &amp;quot;555-456-7890&amp;quot;,
                value: fv!item.phoneNumber,
                saveInto: fv!item.phoneNumber
              ),
              a!dateField(
                label: &amp;quot;start date &amp;quot; &amp;amp; fv!index,
                value: fv!item.startDate,
                saveInto: fv!item.startDate,
                required: true,
                align: &amp;quot;RIGHT&amp;quot;
              ),
              a!richTextDisplayField(
                value: a!richTextIcon(
                  icon: &amp;quot;close&amp;quot;,
                  altText: &amp;quot;delete &amp;quot; &amp;amp; fv!index,
                  caption: &amp;quot;Remove &amp;quot; &amp;amp; fv!item.firstName &amp;amp; &amp;quot; &amp;quot; &amp;amp; fv!item.lastName,
                  link: a!dynamicLink(
                    value: fv!index,
                    saveInto: {
                      a!save(
                        local!employees,
                        remove(local!employees, save!value)
                      )
                    }
                  ),
                  linkStyle: &amp;quot;STANDALONE&amp;quot;,
                  color: &amp;quot;NEGATIVE&amp;quot;
                )
              )
            },
            id: fv!index
          )
        ),
        addRowlink: a!dynamicLink(
          label: &amp;quot;Add Employee&amp;quot;,
          value: { startDate: today() + 1 },
          saveInto: {
            a!save(
              local!employees,
              append(local!employees, save!value)
            )
          }
        ),
        rowHeader: 1
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fetch Total count Editable Grid</title><link>https://community.appian.com/thread/139507?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 12:35:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bfcec294-79d4-4f59-87ee-3a4069479036</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Can you share your expression? You might need to update a local variable, but it&amp;#39;s hard to tell what&amp;#39;s wrong without seeing your expression. Also just keep in mind that the &amp;quot;totalCount&amp;quot; parameter doesn&amp;#39;t really do much - it&amp;#39;s only purpose is to display the total count in the bottom of the grid (if there are 5 or more items) - it isn&amp;#39;t required to build the grid.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fetch Total count Editable Grid</title><link>https://community.appian.com/thread/139506?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 12:09:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f3cbe5ef-485a-402a-9f6b-83241e274692</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Could it be that you have any null values in that data? My question would be, where do these null values come from? Try to not add any null values or use the length() function which ignores null values.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>