<?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>Pagination in Editable Grid</title><link>https://community.appian.com/discussions/f/new-to-appian/24424/pagination-in-editable-grid</link><description>Hi, 
 
 1)I want to Implement pagination in Editable Grid please guide me. 
 2)Add sorting arrows in Editable Grid header columns for sorting purpose. 
 
 Appreciate your help!! 
 
 Regards 
 Nishtha Bhatnagar</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/153376?ContentTypeID=1</link><pubDate>Mon, 02 Feb 2026 16:57:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6c419fc2-306c-43a4-aef2-6721033698e1</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="105288" url="~/discussions/f/new-to-appian/24424/pagination-in-editable-grid/153354"]Use indexing like this[/quote]
&lt;p&gt;The setup you&amp;#39;ve pictured here might work, though at this point I recommend, instead of writing out that huge index expression every time, that the value be stored in a row-specific Local variable for reuse (and ease of debugging), if anything.&lt;/p&gt;
&lt;p&gt;Also, I stand behind my usual recommendation that devs avoid the approach of manually adding paging to editable grids unless&amp;nbsp;&lt;em&gt;&lt;strong&gt;literally all other approaches&lt;/strong&gt;&lt;/em&gt;&lt;strong&gt;&lt;/strong&gt; have been tried and found to be insufficient.&amp;nbsp; I still (over &amp;quot;4 years later&amp;quot; in the case of this Zombie Thread) recommend going with read-only (&amp;quot;paging&amp;quot;) grids where each row has an individual &amp;quot;edit icon&amp;quot;, which shows a mini editing interface for just that row after being clicked, which the user can then &amp;quot;save&amp;quot; or &amp;quot;cancel&amp;quot; out of - this offers better and more easy control over things like validation, and less space constraints.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/153354?ContentTypeID=1</link><pubDate>Sun, 01 Feb 2026 13:08:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:389b0aec-b60a-4058-8c34-66335f83ecf8</guid><dc:creator>Mohan Reddy Kethireddigari</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/62/pastedimage1769951178219v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Use indexing like this, or the data will be overwritten for the same row across all pages.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/102318?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2022 01:53:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9011c624-2359-4e80-a975-c1f4a1536f04</guid><dc:creator>ambrishs</dc:creator><description>&lt;p&gt;This code can be used to build pagination UI for editable grid&lt;pre class="ui-code" data-mode="text"&gt;with(
  local!maxStartIndex: 1 + rounddown(
    (
      ri!totalCount - 1
    ) / ri!pagingInfo.batchSize,
    0
  ) * ri!pagingInfo.batchSize,
  local!style: &amp;quot;STRONG&amp;quot;,
  if(
    rule!replaceNull(
      ri!showWhen,
      true
    ),
    {
      a!richTextDisplayField(
        align: rule!replaceNull(
          ri!align,
          &amp;quot;CENTER&amp;quot;
        ),
        value: {
          a!richTextIcon(
            icon: &amp;quot;angle-double-left&amp;quot;,
            size: &amp;quot;MEDIUM&amp;quot;,
            link: if(
              property(
                ri!pagingInfo,
                &amp;quot;startIndex&amp;quot;,
                1
              ) &amp;lt;&amp;gt; 1,
              a!dynamicLink(
                saveInto: {
                  a!save(
                    ri!pagingInfo,
                    a!pagingInfo(
                      startIndex: 1,
                      batchSize: property(
                        ri!pagingInfo,
                        &amp;quot;batchSize&amp;quot;,
                        - 1
                      ),
                      sort: property(
                        ri!pagingInfo,
                        &amp;quot;sort&amp;quot;,
                        null
                      )
                    )
                  ),
                  ri!saveInto
                }
              ),
              null
            ),
            linkStyle: &amp;quot;STANDALONE&amp;quot;
          ),
          a!richTextIcon(
            icon: &amp;quot;angle-left&amp;quot;,
            size: &amp;quot;MEDIUM&amp;quot;,
            link: if(
              property(
                ri!pagingInfo,
                &amp;quot;startIndex&amp;quot;,
                1
              ) &amp;lt;&amp;gt; 1,
              a!dynamicLink(
                saveInto: {
                  a!save(
                    ri!pagingInfo,
                    a!pagingInfo(
                      startIndex: max(
                        1,
                        property(
                          ri!pagingInfo,
                          &amp;quot;startIndex&amp;quot;,
                          1
                        ) - property(
                          ri!pagingInfo,
                          &amp;quot;batchSize&amp;quot;,
                          0
                        )
                      ),
                      batchSize: property(
                        ri!pagingInfo,
                        &amp;quot;batchSize&amp;quot;,
                        - 1
                      ),
                      sort: property(
                        ri!pagingInfo,
                        &amp;quot;sort&amp;quot;,
                        null
                      )
                    )
                  ),
                  ri!saveInto
                }
              ),
              null
            ),
            linkStyle: &amp;quot;STANDALONE&amp;quot;
          ),
          a!richTextItem(
            text: concat(
              &amp;quot; &amp;quot;,
              min(
                ri!totalCount,
                property(
                  ri!pagingInfo,
                  &amp;quot;startIndex&amp;quot;,
                  1
                )
              ),
              &amp;quot; - &amp;quot;,
              min(
                ri!totalCount,
                property(
                  ri!pagingInfo,
                  &amp;quot;startIndex&amp;quot;,
                  1
                ) + if(
                  property(
                    ri!pagingInfo,
                    &amp;quot;batchSize&amp;quot;,
                    - 1
                  ) = - 1,
                  ri!totalCount,
                  property(
                    ri!pagingInfo,
                    &amp;quot;batchSize&amp;quot;,
                    - 1
                  )
                ) - 1
              )
            ),
            style: &amp;quot;STRONG&amp;quot;,
            size: &amp;quot;STANDARD&amp;quot;
          ),
          a!richTextItem(
            text: concat(
              &amp;quot; of &amp;quot;,
              ri!totalCount,
              &amp;quot; &amp;quot;
            ),
            style: &amp;quot;STRONG&amp;quot;,
            size: &amp;quot;STANDARD&amp;quot;
          ),
          a!richTextIcon(
            icon: &amp;quot;angle-right&amp;quot;,
            size: &amp;quot;MEDIUM&amp;quot;,
            link: if(
              property(
                ri!pagingInfo,
                &amp;quot;startIndex&amp;quot;,
                1
              ) &amp;lt;&amp;gt; local!maxStartIndex,
              a!dynamicLink(
                saveInto: {
                  a!save(
                    ri!pagingInfo,
                    a!pagingInfo(
                      startIndex: min(
                        local!maxStartIndex,
                        property(
                          ri!pagingInfo,
                          &amp;quot;startIndex&amp;quot;,
                          1
                        ) + property(
                          ri!pagingInfo,
                          &amp;quot;batchSize&amp;quot;,
                          0
                        )
                      ),
                      batchSize: property(
                        ri!pagingInfo,
                        &amp;quot;batchSize&amp;quot;,
                        - 1
                      ),
                      sort: property(
                        ri!pagingInfo,
                        &amp;quot;sort&amp;quot;,
                        null
                      )
                    )
                  ),
                  ri!saveInto
                }
              ),
              null
            ),
            linkStyle: &amp;quot;STANDALONE&amp;quot;
          ),
          a!richTextIcon(
            icon: &amp;quot;angle-double-right&amp;quot;,
            size: &amp;quot;MEDIUM&amp;quot;,
            link: if(
              property(
                ri!pagingInfo,
                &amp;quot;startIndex&amp;quot;,
                1
              ) &amp;lt;&amp;gt; local!maxStartIndex,
              a!dynamicLink(
                saveInto: {
                  a!save(
                    ri!pagingInfo,
                    a!pagingInfo(
                      startIndex: local!maxStartIndex,
                      batchSize: property(
                        ri!pagingInfo,
                        &amp;quot;batchSize&amp;quot;,
                        - 1
                      ),
                      sort: property(
                        ri!pagingInfo,
                        &amp;quot;sort&amp;quot;,
                        null
                      )
                    )
                  ),
                  ri!saveInto
                }
              ),
              null
            ),
            linkStyle: &amp;quot;STANDALONE&amp;quot;
          )
        }
      )
    },
    {}
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94695?ContentTypeID=1</link><pubDate>Thu, 05 May 2022 18:21:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6a2f273e-541a-45a2-8956-3c6af188598d</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The code I included above is only meant to serve as a template - the logic for getting the by-row RowIndex will need to be tested/refined by anyone attempting to implement it.&amp;nbsp; But otherwise, this solution should work and will be the most straightforward way of accomplishing this use case.&lt;/p&gt;
&lt;p&gt;That said - I can&amp;#39;t help you with just &amp;quot;gives error&amp;quot;.&amp;nbsp; Can you share what the error says / post a screenshot / etc?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94693?ContentTypeID=1</link><pubDate>Thu, 05 May 2022 18:13:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:291800bb-741c-4022-9152-9ea5728c422b</guid><dc:creator>jojog0002</dc:creator><description>&lt;p&gt;Hii mike,&lt;/p&gt;
&lt;p&gt;This above code gives error. please&amp;nbsp; give me any other solution&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94677?ContentTypeID=1</link><pubDate>Thu, 05 May 2022 14:03:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2374c5e5-a419-4b32-bb80-d9d8baad78d0</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="111610" url="~/discussions/f/new-to-appian/24424/pagination-in-editable-grid/94665#94665"]when we go on second page then we can click on add employee then new row appears then we try to delete it then it deleted above row [/quote]
&lt;p&gt;This is because of the issue I &lt;a href="/discussions/f/new-to-appian/24424/pagination-in-editable-grid/94616#94616"&gt;mentioned yesterday&lt;/a&gt;.&amp;nbsp; &amp;quot;&lt;strong&gt;&lt;em&gt;fv!index&lt;/em&gt;&lt;/strong&gt;&amp;quot; will always be relative to the current page of data, whereas if you&amp;#39;re on a subsequent page and you try to edit/remove an entry on that page (anchoring on fv!index), you&amp;#39;ll really be editing/removing the indicated entry from the first page.&lt;/p&gt;
&lt;p&gt;The real solution to this, if you insist on continuing down this rabbit hole, is to declare row-specific local variables.&amp;nbsp; Inside the row&amp;#39;s local variable definition, you insert logic to give you the &lt;em&gt;&lt;strong&gt;index in the original array of source data&lt;/strong&gt;&lt;/em&gt; corresponding to the &lt;em&gt;current row&lt;/em&gt;.&amp;nbsp; Thus, on page 2 (assuming you have a page size of 10 for example), your rows will have &amp;quot;&lt;em&gt;local!rowIndex&lt;/em&gt;&amp;quot; values of 11 - 20, instead of fv!index which would still be 1 - 10.&amp;nbsp;&amp;nbsp; Then &lt;em&gt;local!rowIndex&lt;/em&gt; can be used in place of &amp;quot;fv!index&amp;quot; in most places in the above code.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;rows: a!forEach(
  items: local!datasubset,
  expression: a!localVariables(
  
    local!rowIndex: where(local!originalArray.id = fv!item.id),
    
    a!gridRowLayout(
      contents: { ....&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94665?ContentTypeID=1</link><pubDate>Thu, 05 May 2022 10:51:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a9446828-2692-4bc1-a3cf-fdf47ad2be95</guid><dc:creator>jojog0002</dc:creator><description>&lt;p&gt;Hii&amp;nbsp; Dimitris,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;when we go on second page then we can click on add employee then new row appears then we try to delete it then it deleted above row with data and blank row is still there.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* For the Removal Column*/
              a!richTextDisplayField(
                value: a!richTextIcon(
                  icon: &amp;quot;trash-o&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: {
                      if(
                        isnull(fv!item.Id),
                        {},
                        a!save(
                          local!deletedEmployeeIds,
                          append(local!deletedEmployeeIds, fv!item.Id)
                        )
                      ),
                      a!save(ri!Del, true),
                      a!save(ri!Del_Id, local!deletedEmployeeIds),
                      a!save(
                        local!Employeedata,
                        remove(local!Employeedata, save!value)
                      )
                    }
                  ),
                  linkStyle: &amp;quot;STANDALONE&amp;quot;,
                  color: &amp;quot;NEGATIVE&amp;quot;
                )
              )
            }
          )
        ),&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94644?ContentTypeID=1</link><pubDate>Thu, 05 May 2022 06:45:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4a96441d-fc11-40c1-8a00-f945d35f29f5</guid><dc:creator>jojog0002</dc:creator><description>&lt;p&gt;Hii Dimitris,&lt;/p&gt;
&lt;p&gt;Thank u so so much .Its worked fine .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94617?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 17:52:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:36bbfc6c-e4b9-416c-8d01-31d27adba548</guid><dc:creator>Dimitris Soulovaris</dc:creator><description>&lt;p&gt;You right. Didn&amp;#39;t test the second page at all..LOL&lt;/p&gt;
&lt;p&gt;It needs the fv!identifier instead of the fv!index.&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/62/pastedimage1651686698721v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;But as you said, it&amp;#39;s becoming more complex.&amp;nbsp;But that&amp;#39;s a good task for the reporter so he can practice more on Appian.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94616?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 17:40:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:57b7919b-944c-45ef-b19f-2acb6a799806</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;That works on the first page.&amp;nbsp; But on subsequent pages, the value of fv!index (i.e. for the first row on the new page) will be &amp;quot;1&amp;quot;, whereas the index you&amp;#39;re actually trying to save into in the source data would be &amp;quot;1&amp;quot; + (page size * (page number - 1)).&amp;nbsp; In the above code, if you&amp;#39;re on page 2 and you update row 1, you&amp;#39;d actually be saving into the field for page 1&amp;#39;s row 1.&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1651686032075v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;This can be fixed with &lt;em&gt;&lt;strong&gt;yet more&lt;/strong&gt;&lt;/em&gt; saveInto hijinks - though as you can see the rabbit hole just keeps getting deeper.&amp;nbsp; I&amp;#39;ve always found it pretty unmanageable and, frankly, not worth the hassle when compared to a simple and elegant solution like a read-only grid with a row-by-row &amp;quot;edit&amp;quot; button.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94613?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 17:29:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:825f8b07-e71f-414f-854d-d95fd70a3319</guid><dc:creator>Dimitris Soulovaris</dc:creator><description>&lt;p&gt;Hi Mike,&lt;/p&gt;
&lt;p&gt;Yes, you are right about everything you mentioned for the non-saved data. In the current implementation, the modified values are not being saved.&lt;/p&gt;
&lt;p&gt;He has to save the data in the&amp;nbsp;&lt;em&gt;&lt;strong&gt;source&lt;/strong&gt;&lt;/em&gt;&amp;nbsp;as you said.&lt;em&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/em&gt;Therefore, he should do the&amp;nbsp;data saving&amp;nbsp;&lt;strong&gt;inside&lt;/strong&gt; the grid and after editing.&lt;/p&gt;
&lt;p&gt;Here it is what he needs to do exactly:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="/members/jojog0002"&gt;jojog0002&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/62/pastedimage1651684835473v1.png" alt=" " /&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The pagination functionality remains as is.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;em&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94606?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 16:21:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:01470dbc-d52d-4a04-b217-f64bb6e71c67</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;As I &lt;a href="/discussions/f/new-to-appian/24474/pagination-in-editable-grid/94588#94588"&gt;noted in the other thread&lt;/a&gt;... as far as I can tell from this code, the row-level user changes are only saved up as far as the dataSubset (and i don&amp;#39;t see any code that propagates such changes any further than that), but of course that&amp;#39;s all overwritten the second the user changes pages.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some additional SaveInto bending-over-backwards would need to be added to promote any user changes back to the &lt;em&gt;&lt;strong&gt;source data&lt;/strong&gt;&lt;/em&gt;, but of course at that point, we&amp;#39;re talking about such complicated code that most devs would have saved days of heartache and headache by just implementing a paging grid with a row-level &amp;quot;edit&amp;quot; button.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94601?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 15:24:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ed0ae8e5-c6a8-4685-8492-2640bf58a7d6</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;Dimitris explained it pretty well.&lt;br /&gt;Its one way to solve it, but a pretty valid one.&lt;br /&gt;-&amp;gt; jojog, what are you missing exactly?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94585?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 09:16:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7b9f2508-f4bc-4845-8170-79340706546f</guid><dc:creator>Dimitris Soulovaris</dc:creator><description>&lt;p&gt;You have everything you need written above on my previous comment. The code for the pagination functionality and how to setup the rule.. Just copy and paste it. That&amp;#39;s all. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94583?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 09:05:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:08547310-5be3-44fd-b601-7d0c83147aba</guid><dc:creator>jojog0002</dc:creator><description>&lt;p&gt;Hi Dimitris,&lt;/p&gt;
&lt;p&gt;please also help me for creation a&amp;nbsp; expression rule for the pagination functionality.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94576?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 07:55:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9cc3c903-1cd9-4305-8ad3-733b7b285a96</guid><dc:creator>Dimitris Soulovaris</dc:creator><description>&lt;p&gt;Hi jojog,&lt;/p&gt;
&lt;p&gt;I have made&amp;nbsp;some changes in your code that are needed for creating the pagination functionality.&lt;/p&gt;
&lt;p&gt;You have to create some local variables first in your code for setting the pagination and create a datasubset of your Employee list.&lt;/p&gt;
&lt;p&gt;Instead of&amp;nbsp;rule!DS_customPaginationForGrids() put the rule name of your expression rule you created with the pagination functionality.&lt;/p&gt;
&lt;p&gt;Let me know the outcome after you test it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!SortedEmployeeData: &amp;quot;FirstName&amp;quot;,
  local!Employeedata: rule!ED_GetEmployeeData(local!SortedEmployeeData),
  local!deletedEmployeeIds,
  /* Create Pagination */
  local!startIndex: 1,
  local!batchSize: 4,
  local!pagingInfo: a!pagingInfo(
    startIndex: local!startIndex,
    batchSize: local!batchSize
  ),
  local!datasubset: todatasubset(
    arrayToPage: local!Employeedata,
    pagingConfiguration: local!pagingInfo
  ),
  a!formLayout(
    label: &amp;quot;Employee Details: Add, Update or Delete Employee Data&amp;quot;,
    contents: {
      a!dropdownField(
        label: &amp;quot;Select a field which you want to sort the columns values&amp;quot;,
        labelPosition: &amp;quot;ABOVE&amp;quot;,
        placeholder: &amp;quot;--- Select a Field---&amp;quot;,
        choiceLabels: {
          &amp;quot;FirstName&amp;quot;,
          &amp;quot;LastName&amp;quot;,
          &amp;quot;Email&amp;quot;,
          &amp;quot;Address&amp;quot;,
          &amp;quot;Department&amp;quot;,
          &amp;quot;Designation&amp;quot;,
          &amp;quot;ContactNumber&amp;quot;,
          &amp;quot;Date Of Joining&amp;quot;,
          &amp;quot;Gender&amp;quot;
        },
        choiceValues: {
          &amp;quot;FirstName&amp;quot;,
          &amp;quot;LastName&amp;quot;,
          &amp;quot;Email&amp;quot;,
          &amp;quot;Address&amp;quot;,
          &amp;quot;Department&amp;quot;,
          &amp;quot;Designation&amp;quot;,
          &amp;quot;ContactNumber&amp;quot;,
          &amp;quot;Date Of Joining&amp;quot;,
          &amp;quot;Gender&amp;quot;
        },
        value: local!SortedEmployeeData,
        saveInto: { value: local!SortedEmployeeData },
        searchDisplay: &amp;quot;AUTO&amp;quot;,
        validations: {}
      ),
      a!gridLayout(
        totalCount: local!datasubset.totalCount,
        /*totalCount: 5,*/
        headerCells: {
          a!gridLayoutHeaderCell(label: &amp;quot;FirstName&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;LastName&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Email&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Address&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Department&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Designation&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Contact Number&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Date Of Joining&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Gender&amp;quot;),
          /*a!gridLayoutHeaderCell(label: &amp;quot;Start Date&amp;quot;, align: &amp;quot;RIGHT&amp;quot; ),*/
          /* For the &amp;quot;Remove&amp;quot; column */
          a!gridLayoutHeaderCell(label: &amp;quot;&amp;quot;)
        },
        /* Only needed when some columns need to be narrow */
        columnConfigs: {
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2),
          a!gridLayoutColumnConfig(width: &amp;quot;ICON&amp;quot;)
        },
        /*
* a!forEach() will take local!employee data and used that data to loop through an
* expression that creates each row.
*
* When modifying the recipe to work with your data, you only need to change:
* 1.) the number of fields in each row
* 2.) the types of fields for each column (i.e. a!textField() for text data elements)
* 3.) the fv!item elements. For example fv!item.firstName would change to fv!item.yourdata
*/
        rows: a!forEach(
          items: local!datasubset,
          expression: a!gridRowLayout(
            id: fv!item,
            /*id: fv!index,*/
            contents: {
              /* For the FirstName Column*/
              a!textField(
                /* Labels are not visible in grid cells but are necessary to meet accessibility requirements */
                label: &amp;quot;FirstName &amp;quot; &amp;amp; fv!index,
                value: fv!item.FirstName,
                saveInto: fv!item.FirstName,
                required: true
              ),
              /* For the lastName Column*/
              a!textField(
                label: &amp;quot;LastName &amp;quot; &amp;amp; fv!index,
                value: fv!item.LastName,
                saveInto: fv!item.LastName,
                required: true
              ),
              /* For the Email Address Column*/
              a!textField(
                label: &amp;quot;Email&amp;quot; &amp;amp; fv!index,
                value: fv!item.Email,
                saveInto: fv!item.Email,
                required: true,
                validations: {
                  if(
                    regexmatch(
                      &amp;quot;^[A-Z0-9\&amp;#39;\+\&amp;amp;\%_-]+(\.{0,1}[A-Z0-9\&amp;#39;\+\&amp;amp;\%_-]+)*[@]{1}[A-Z0-9.-]*[A-Z0-9-]+[.]{1}[A-Z]{2,6}$&amp;quot;,
                      fv!item.Email
                    ),
                    &amp;quot;&amp;quot;,
                    &amp;quot;provide valid email address&amp;quot;
                  )
                }
              ),
              /* For the Address Column*/
              a!textField(
                label: &amp;quot; Address&amp;quot; &amp;amp; fv!index,
                value: fv!item.Address,
                saveInto: fv!item.Address,
                required: true
              ),
              /* For the Department Column*/
              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
              ),
              /* For the Designation Column*/
              a!dropdownField(
                label: &amp;quot;Designation &amp;quot; &amp;amp; fv!index,
                placeholder: &amp;quot;-- Select -- &amp;quot;,
                choiceLabels: {
                  &amp;quot;Software Engineer&amp;quot;,
                  &amp;quot;Support Engineer&amp;quot;,
                  &amp;quot;Tester&amp;quot;,
                  &amp;quot;Marking Specialist&amp;quot;,
                  &amp;quot;Web Developer&amp;quot;,
                  &amp;quot;.Net Developer&amp;quot;,
                  &amp;quot;Graphic Designer&amp;quot;,
                  &amp;quot;Application Developer&amp;quot;
                },
                choiceValues: {
                  &amp;quot;Software Engineer&amp;quot;,
                  &amp;quot;Support Engineer&amp;quot;,
                  &amp;quot;Tester&amp;quot;,
                  &amp;quot;Marking Specialist&amp;quot;,
                  &amp;quot;Web Developer&amp;quot;,
                  &amp;quot;.Net Developer&amp;quot;,
                  &amp;quot;Graphic Designer&amp;quot;,
                  &amp;quot;Application Developer&amp;quot;
                },
                value: fv!item.Designation,
                saveInto: fv!item.Designation,
                required: true
              ),
              /* For the ContactNumber Column*/
              a!textField(
                label: &amp;quot;ContactNumber&amp;quot; &amp;amp; fv!index,
                /*placeholder:&amp;quot;555-456-7890&amp;quot;,*/
                value: fv!item.ContactNumber,
                saveInto: fv!item.ContactNumber,
                validations: {
                  if(
                    regexmatch(
                      &amp;quot;^(\+\d{1,3}[- ]?)?\d{10}$&amp;quot;,
                      fv!item.ContactNumber
                    ),
                    &amp;quot;&amp;quot;,
                    &amp;quot;provide valid contact number&amp;quot;
                  )
                }/*validations:if(len(fv!item.ContactNumber)=10,&amp;quot;&amp;quot;,&amp;quot;please enter valid Number&amp;quot;)*/
                
              ),
              a!dateField(
                label: &amp;quot;Date Of Joining &amp;quot; &amp;amp; fv!index,
                value: fv!item.HireDate,
                saveInto: fv!item.HireDate,
                required: true,
                align: &amp;quot;RIGHT&amp;quot;
              ),
              /* For the Gender Column*/
              a!dropdownField(
                label: &amp;quot;Gender &amp;quot; &amp;amp; fv!index,
                placeholder: &amp;quot;-- Select -- &amp;quot;,
                choiceLabels: { &amp;quot;Male&amp;quot;, &amp;quot;Female&amp;quot; },
                choiceValues: { &amp;quot;Male&amp;quot;, &amp;quot;Female&amp;quot; },
                value: fv!item.Gender,
                saveInto: fv!item.Gender,
                required: true
              ),
              /* For the Removal Column*/
              a!richTextDisplayField(
                value: a!richTextIcon(
                  icon: &amp;quot;trash-o&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: {
                      if(
                        isnull(fv!item.Id),
                        {},
                        a!save(
                          local!deletedEmployeeIds,
                          append(local!deletedEmployeeIds, fv!item.Id)
                        )
                      ),
                      a!save(ri!Del, true),
                      a!save(ri!Del_Id, local!deletedEmployeeIds),
                      a!save(
                        local!Employeedata,
                        remove(local!Employeedata, save!value)
                      )
                    }
                  ),
                  linkStyle: &amp;quot;STANDALONE&amp;quot;,
                  color: &amp;quot;NEGATIVE&amp;quot;
                )
              )
            }
          )
        ),
        selectionStyle: &amp;quot;ROW_HIGHLIGHT&amp;quot;,
        selectionRequired: false,
        addRowlink: a!dynamicLink(
          label: &amp;quot;Add Employee&amp;quot;,
          value: { &amp;#39;type!{urn:com:appian:types:ED}ED_Employee_Details_dt&amp;#39;() },
          saveInto: {
            a!save(
              local!Employeedata,
              append(local!Employeedata, save!value)
            )
          }
        ),
        shadeAlternateRows: true,
        spacing: &amp;quot;STANDARD&amp;quot;,
        rowHeader: 1
      ),
      
      /* Pagination Functionality */
      rule!DS_customPaginationForGrids(
        startIndex: local!startIndex,
        batchSize: local!batchSize,
        totalCount: local!datasubset.totalCount
      ),
      
    },
    buttons: a!buttonLayout(
      primaryButtons: a!buttonWidget(
        label: &amp;quot;Submit&amp;quot;,
        saveInto: { a!save(ri!item, local!Employeedata) },
        submit: true,
        style: &amp;quot;PRIMARY&amp;quot;
      ),
      secondaryButtons: {
        a!buttonWidget(
          label: &amp;quot;Cancel&amp;quot;,
          value: true,
          saveInto: { ri!Cancel },
          submit: true,
          style: &amp;quot;NORMAL&amp;quot;,
          validate: false
        )
      }
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94575?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 07:55:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bdcdcaf5-9e7e-4776-a1b7-79691981d93f</guid><dc:creator>jojog0002</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!SortedEmployeeData:&amp;quot;FirstName&amp;quot;,
  local!Employeedata: rule!ED_GetEmployeeData(local!SortedEmployeeData),
  local!deletedEmployeeIds,

  a!formLayout(
    label: &amp;quot;Employee Details: Add, Update or Delete Employee Data&amp;quot;,
    contents: {
      a!dropdownField(
        label: &amp;quot;Select a field which you want to sort the columns values&amp;quot;,
        labelPosition: &amp;quot;ABOVE&amp;quot;,
        placeholder: &amp;quot;--- Select a Field---&amp;quot;,
        choiceLabels: {&amp;quot;FirstName&amp;quot;, &amp;quot;LastName&amp;quot;, &amp;quot;Email&amp;quot;, &amp;quot;Address&amp;quot;,
                        &amp;quot;Department&amp;quot;, &amp;quot;Designation&amp;quot;, &amp;quot;ContactNumber&amp;quot;, &amp;quot;Date Of Joining&amp;quot;,
                        &amp;quot;Gender&amp;quot;},
        choiceValues: {&amp;quot;FirstName&amp;quot;, &amp;quot;LastName&amp;quot;, &amp;quot;Email&amp;quot;, &amp;quot;Address&amp;quot;,
                        &amp;quot;Department&amp;quot;, &amp;quot;Designation&amp;quot;, &amp;quot;ContactNumber&amp;quot;, &amp;quot;Date Of Joining&amp;quot;,
                        &amp;quot;Gender&amp;quot;},
        value:local!SortedEmployeeData,
        saveInto: {value:local!SortedEmployeeData},
        searchDisplay: &amp;quot;AUTO&amp;quot;,
        validations: {}
      ),
      a!gridLayout(
        totalCount: count( local!Employeedata),
        /*totalCount: 5,*/
        headerCells: {
          a!gridLayoutHeaderCell(label: &amp;quot;FirstName&amp;quot; ),
          a!gridLayoutHeaderCell(label: &amp;quot;LastName&amp;quot; ),
          a!gridLayoutHeaderCell(label: &amp;quot;Email&amp;quot; ),
          a!gridLayoutHeaderCell(label: &amp;quot;Address&amp;quot; ),
          a!gridLayoutHeaderCell(label: &amp;quot;Department&amp;quot; ),
          a!gridLayoutHeaderCell(label: &amp;quot;Designation&amp;quot; ),
          a!gridLayoutHeaderCell(label: &amp;quot;Contact Number&amp;quot; ),
          a!gridLayoutHeaderCell(label: &amp;quot;Date Of Joining&amp;quot; ),
          a!gridLayoutHeaderCell(label: &amp;quot;Gender&amp;quot; ),
        
          /*a!gridLayoutHeaderCell(label: &amp;quot;Start Date&amp;quot;, align: &amp;quot;RIGHT&amp;quot; ),*/
          /* For the &amp;quot;Remove&amp;quot; column */
          a!gridLayoutHeaderCell(label: &amp;quot;&amp;quot; )
        },
        /* Only needed when some columns need to be narrow */
        columnConfigs: {
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),
          a!gridLayoutColumnConfig(width: &amp;quot;ICON&amp;quot;)
        },
        /*
        * a!forEach() will take local!employee data and used that data to loop through an
        * expression that creates each row.
        *
        * When modifying the recipe to work with your data, you only need to change:
        * 1.) the number of fields in each row
        * 2.) the types of fields for each column (i.e. a!textField() for text data elements)
        * 3.) the fv!item elements. For example fv!item.firstName would change to fv!item.yourdata
        */
        rows: a!forEach(
          items: local!Employeedata,
          expression: a!gridRowLayout(
            id:fv!item,
            /*id: fv!index,*/
            contents: {
              /* For the FirstName Column*/
              a!textField(
                /* Labels are not visible in grid cells but are necessary to meet accessibility requirements */
                label: &amp;quot;FirstName &amp;quot; &amp;amp; fv!index,
                value: fv!item.FirstName,
                saveInto: fv!item.FirstName,
                required: true
              ),
              /* For the lastName Column*/
              a!textField(
                label: &amp;quot;LastName &amp;quot; &amp;amp; fv!index,
                value: fv!item.LastName,
                saveInto: fv!item.LastName,
                required:true
              ),
              /* For the Email Address Column*/

              a!textField(
                label: &amp;quot;Email&amp;quot; &amp;amp; fv!index,
                value: fv!item.Email,
                saveInto: fv!item.Email,
                required:true,
                validations: {if(regexmatch(&amp;quot;^[A-Z0-9\&amp;#39;\+\&amp;amp;\%_-]+(\.{0,1}[A-Z0-9\&amp;#39;\+\&amp;amp;\%_-]+)*[@]{1}[A-Z0-9.-]*[A-Z0-9-]+[.]{1}[A-Z]{2,6}$&amp;quot;,
                fv!item.Email),&amp;quot;&amp;quot;,&amp;quot;provide valid email address&amp;quot;

                )}
              ),
              /* For the Address Column*/
              a!textField(
                label: &amp;quot; Address&amp;quot; &amp;amp; fv!index,
                value: fv!item.Address,
                saveInto: fv!item.Address,
                required:true
              ),
              /* For the Department Column*/
              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
              ),
              /* For the Designation Column*/
              a!dropdownField(
                label: &amp;quot;Designation &amp;quot; &amp;amp; fv!index,
                placeholder: &amp;quot;-- Select -- &amp;quot;,
                choiceLabels:{&amp;quot;Software Engineer&amp;quot;,&amp;quot;Support Engineer&amp;quot;,&amp;quot;Tester&amp;quot;,&amp;quot;Marking Specialist&amp;quot;,&amp;quot;Web Developer&amp;quot;,&amp;quot;.Net Developer&amp;quot;,&amp;quot;Graphic Designer&amp;quot;,&amp;quot;Application Developer&amp;quot;},
                choiceValues:{&amp;quot;Software Engineer&amp;quot;,&amp;quot;Support Engineer&amp;quot;,&amp;quot;Tester&amp;quot;,&amp;quot;Marking Specialist&amp;quot;,&amp;quot;Web Developer&amp;quot;,&amp;quot;.Net Developer&amp;quot;,&amp;quot;Graphic Designer&amp;quot;,&amp;quot;Application Developer&amp;quot;} ,
                value: fv!item.Designation,
                saveInto: fv!item.Designation,
                required:true
              ),

              /* For the ContactNumber Column*/
              a!textField(
                label: &amp;quot;ContactNumber&amp;quot; &amp;amp; fv!index,
                /*placeholder:&amp;quot;555-456-7890&amp;quot;,*/
                value: fv!item.ContactNumber,
                saveInto: fv!item.ContactNumber,
                validations: {if(regexmatch(
                  &amp;quot;^(\+\d{1,3}[- ]?)?\d{10}$&amp;quot;,
                  fv!item.ContactNumber),&amp;quot;&amp;quot;,&amp;quot;provide valid contact number&amp;quot;)}
              
                /*validations:if(len(fv!item.ContactNumber)=10,&amp;quot;&amp;quot;,&amp;quot;please enter valid Number&amp;quot;)*/
              
            
              ),


              a!dateField(
                label: &amp;quot;Date Of Joining &amp;quot; &amp;amp; fv!index,
                value: fv!item.HireDate,
                saveInto: fv!item.HireDate,
                required:true,
                align: &amp;quot;RIGHT&amp;quot;
              ),
              /* For the Gender Column*/
              a!dropdownField(
                label: &amp;quot;Gender &amp;quot; &amp;amp; fv!index,
                placeholder: &amp;quot;-- Select -- &amp;quot;,
                choiceLabels: {&amp;quot;Male&amp;quot;,&amp;quot;Female&amp;quot;},
                choiceValues: {&amp;quot;Male&amp;quot;,&amp;quot;Female&amp;quot;},

                value: fv!item.Gender,
                saveInto: fv!item.Gender,
                required:true
              ),
            
              /* For the Removal Column*/
              a!richTextDisplayField(
                value: a!richTextIcon(
                  icon: &amp;quot;trash-o&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: {
                      
                      if(
                        isnull(fv!item.Id),
                        {},
                        a!save(local!deletedEmployeeIds,append(local!deletedEmployeeIds,fv!item.Id))
                        
                      ),
                      a!save(ri!Del,true),
                      a!save(ri!Del_Id,local!deletedEmployeeIds),
                      a!save(local!Employeedata, remove(local!Employeedata, save!value))
                      
                      
                      
                    }
                  ),
                  linkStyle: &amp;quot;STANDALONE&amp;quot;,
                  color: &amp;quot;NEGATIVE&amp;quot;
                )
              )
            }
          )
        ),
        selectionStyle: &amp;quot;ROW_HIGHLIGHT&amp;quot;,
        selectionRequired: false,
        addRowlink: a!dynamicLink(
          label: &amp;quot;Add Employee&amp;quot;,

          value: {
            &amp;#39;type!{urn:com:appian:types:ED}ED_Employee_Details_dt&amp;#39;()
          },
          saveInto: {
            a!save(local!Employeedata, append(local!Employeedata, save!value))
          }
        ),
       
        shadeAlternateRows: true,
        spacing: &amp;quot;STANDARD&amp;quot;,
        rowHeader: 1
      )
     
    },
    buttons: a!buttonLayout(
      primaryButtons: a!buttonWidget(
        label: &amp;quot;Submit&amp;quot;,
        saveInto: {a!save(ri!item,local!Employeedata)},
        submit: true,
        style: &amp;quot;PRIMARY&amp;quot;
      ),
      secondaryButtons: {
        a!buttonWidget(
          label: &amp;quot;Cancel&amp;quot;,
          value: true,
          saveInto: {ri!Cancel},
          submit: true,
          style: &amp;quot;NORMAL&amp;quot;,
          validate: false
        )
      }
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94572?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 06:54:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:622658bd-44fd-4986-853c-b14cd4ad7304</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;Hello jojog,&lt;br /&gt;please use the following for inserting code. I makes it way easier to read. :)&amp;nbsp;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1651647194454v1.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94571?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 06:40:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0210a4d8-9349-4912-be7e-fe5c13031ec0</guid><dc:creator>jojog0002</dc:creator><description>&lt;p&gt;Hii Dimitris,&lt;/p&gt;
&lt;p&gt;Here is my code :&lt;/p&gt;
&lt;p&gt;a!localVariables(&lt;br /&gt; local!SortedEmployeeData:&amp;quot;FirstName&amp;quot;,&lt;br /&gt; local!Employeedata: rule!ED_GetEmployeeData(local!SortedEmployeeData),&lt;br /&gt; local!deletedEmployeeIds,&lt;/p&gt;
&lt;p&gt;a!formLayout(&lt;br /&gt; label: &amp;quot;Employee Details: Add, Update or Delete Employee Data&amp;quot;,&lt;br /&gt; contents: {&lt;br /&gt; a!dropdownField(&lt;br /&gt; label: &amp;quot;Select a field which you want to sort the columns values&amp;quot;,&lt;br /&gt; labelPosition: &amp;quot;ABOVE&amp;quot;,&lt;br /&gt; placeholder: &amp;quot;--- Select a Field---&amp;quot;,&lt;br /&gt; choiceLabels: {&amp;quot;FirstName&amp;quot;, &amp;quot;LastName&amp;quot;, &amp;quot;Email&amp;quot;, &amp;quot;Address&amp;quot;,&lt;br /&gt; &amp;quot;Department&amp;quot;, &amp;quot;Designation&amp;quot;, &amp;quot;ContactNumber&amp;quot;, &amp;quot;Date Of Joining&amp;quot;,&lt;br /&gt; &amp;quot;Gender&amp;quot;},&lt;br /&gt; choiceValues: {&amp;quot;FirstName&amp;quot;, &amp;quot;LastName&amp;quot;, &amp;quot;Email&amp;quot;, &amp;quot;Address&amp;quot;,&lt;br /&gt; &amp;quot;Department&amp;quot;, &amp;quot;Designation&amp;quot;, &amp;quot;ContactNumber&amp;quot;, &amp;quot;Date Of Joining&amp;quot;,&lt;br /&gt; &amp;quot;Gender&amp;quot;},&lt;br /&gt; value:local!SortedEmployeeData,&lt;br /&gt; saveInto: {value:local!SortedEmployeeData},&lt;br /&gt; searchDisplay: &amp;quot;AUTO&amp;quot;,&lt;br /&gt; validations: {}&lt;br /&gt; ),&lt;br /&gt; a!gridLayout(&lt;br /&gt; totalCount: count( local!Employeedata),&lt;br /&gt; /*totalCount: 5,*/&lt;br /&gt; headerCells: {&lt;br /&gt; a!gridLayoutHeaderCell(label: &amp;quot;FirstName&amp;quot; ),&lt;br /&gt; a!gridLayoutHeaderCell(label: &amp;quot;LastName&amp;quot; ),&lt;br /&gt; a!gridLayoutHeaderCell(label: &amp;quot;Email&amp;quot; ),&lt;br /&gt; a!gridLayoutHeaderCell(label: &amp;quot;Address&amp;quot; ),&lt;br /&gt; a!gridLayoutHeaderCell(label: &amp;quot;Department&amp;quot; ),&lt;br /&gt; a!gridLayoutHeaderCell(label: &amp;quot;Designation&amp;quot; ),&lt;br /&gt; a!gridLayoutHeaderCell(label: &amp;quot;Contact Number&amp;quot; ),&lt;br /&gt; a!gridLayoutHeaderCell(label: &amp;quot;Date Of Joining&amp;quot; ),&lt;br /&gt; a!gridLayoutHeaderCell(label: &amp;quot;Gender&amp;quot; ),&lt;br /&gt; &lt;br /&gt; /*a!gridLayoutHeaderCell(label: &amp;quot;Start Date&amp;quot;, align: &amp;quot;RIGHT&amp;quot; ),*/&lt;br /&gt; /* For the &amp;quot;Remove&amp;quot; column */&lt;br /&gt; a!gridLayoutHeaderCell(label: &amp;quot;&amp;quot; )&lt;br /&gt; },&lt;br /&gt; /* Only needed when some columns need to be narrow */&lt;br /&gt; columnConfigs: {&lt;br /&gt; a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),&lt;br /&gt; a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2),&lt;br /&gt; a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),&lt;br /&gt; a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),&lt;br /&gt; a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),&lt;br /&gt; a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),&lt;br /&gt; a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),&lt;br /&gt; a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),&lt;br /&gt; a!gridLayoutColumnConfig(width: &amp;quot;ICON&amp;quot;)&lt;br /&gt; },&lt;br /&gt; /*&lt;br /&gt; * a!forEach() will take local!employee data and used that data to loop through an&lt;br /&gt; * expression that creates each row.&lt;br /&gt; *&lt;br /&gt; * When modifying the recipe to work with your data, you only need to change:&lt;br /&gt; * 1.) the number of fields in each row&lt;br /&gt; * 2.) the types of fields for each column (i.e. a!textField() for text data elements)&lt;br /&gt; * 3.) the fv!item elements. For example fv!item.firstName would change to fv!item.yourdata&lt;br /&gt; */&lt;br /&gt; rows: a!forEach(&lt;br /&gt; items: local!Employeedata,&lt;br /&gt; expression: a!gridRowLayout(&lt;br /&gt; id:fv!item,&lt;br /&gt; /*id: fv!index,*/&lt;br /&gt; contents: {&lt;br /&gt; /* For the FirstName Column*/&lt;br /&gt; a!textField(&lt;br /&gt; /* Labels are not visible in grid cells but are necessary to meet accessibility requirements */&lt;br /&gt; label: &amp;quot;FirstName &amp;quot; &amp;amp; fv!index,&lt;br /&gt; value: fv!item.FirstName,&lt;br /&gt; saveInto: fv!item.FirstName,&lt;br /&gt; required: true&lt;br /&gt; ),&lt;br /&gt; /* For the lastName Column*/&lt;br /&gt; a!textField(&lt;br /&gt; label: &amp;quot;LastName &amp;quot; &amp;amp; fv!index,&lt;br /&gt; value: fv!item.LastName,&lt;br /&gt; saveInto: fv!item.LastName,&lt;br /&gt; required:true&lt;br /&gt; ),&lt;br /&gt; /* For the Email Address Column*/&lt;/p&gt;
&lt;p&gt;a!textField(&lt;br /&gt; label: &amp;quot;Email&amp;quot; &amp;amp; fv!index,&lt;br /&gt; value: fv!item.Email,&lt;br /&gt; saveInto: fv!item.Email,&lt;br /&gt; required:true,&lt;br /&gt; validations: {if(regexmatch(&amp;quot;^[A-Z0-9\'\+\&amp;amp;\%_-]+(\.{0,1}[A-Z0-9\'\+\&amp;amp;\%_-]+)*[@]{1}[A-Z0-9.-]*[A-Z0-9-]+[.]{1}[A-Z]{2,6}$&amp;quot;,&lt;br /&gt; fv!item.Email),&amp;quot;&amp;quot;,&amp;quot;provide valid email address&amp;quot;&lt;/p&gt;
&lt;p&gt;)}&lt;br /&gt; ),&lt;br /&gt; /* For the Address Column*/&lt;br /&gt; a!textField(&lt;br /&gt; label: &amp;quot; Address&amp;quot; &amp;amp; fv!index,&lt;br /&gt; value: fv!item.Address,&lt;br /&gt; saveInto: fv!item.Address,&lt;br /&gt; required:true&lt;br /&gt; ),&lt;br /&gt; /* For the Department Column*/&lt;br /&gt; a!dropdownField(&lt;br /&gt; label: &amp;quot;Department&amp;quot; &amp;amp; fv!index,&lt;br /&gt; placeholder: &amp;quot;-- Select -- &amp;quot;,&lt;br /&gt; 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; },&lt;br /&gt; 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; },&lt;/p&gt;
&lt;p&gt;value: fv!item.Department,&lt;br /&gt; saveInto: fv!item.Department,&lt;br /&gt; required:true&lt;br /&gt; ),&lt;br /&gt; /* For the Designation Column*/&lt;br /&gt; a!dropdownField(&lt;br /&gt; label: &amp;quot;Designation &amp;quot; &amp;amp; fv!index,&lt;br /&gt; placeholder: &amp;quot;-- Select -- &amp;quot;,&lt;br /&gt; choiceLabels:{&amp;quot;Software Engineer&amp;quot;,&amp;quot;Support Engineer&amp;quot;,&amp;quot;Tester&amp;quot;,&amp;quot;Marking Specialist&amp;quot;,&amp;quot;Web Developer&amp;quot;,&amp;quot;.Net Developer&amp;quot;,&amp;quot;Graphic Designer&amp;quot;,&amp;quot;Application Developer&amp;quot;},&lt;br /&gt; choiceValues:{&amp;quot;Software Engineer&amp;quot;,&amp;quot;Support Engineer&amp;quot;,&amp;quot;Tester&amp;quot;,&amp;quot;Marking Specialist&amp;quot;,&amp;quot;Web Developer&amp;quot;,&amp;quot;.Net Developer&amp;quot;,&amp;quot;Graphic Designer&amp;quot;,&amp;quot;Application Developer&amp;quot;} ,&lt;br /&gt; value: fv!item.Designation,&lt;br /&gt; saveInto: fv!item.Designation,&lt;br /&gt; required:true&lt;br /&gt; ),&lt;/p&gt;
&lt;p&gt;/* For the ContactNumber Column*/&lt;br /&gt; a!textField(&lt;br /&gt; label: &amp;quot;ContactNumber&amp;quot; &amp;amp; fv!index,&lt;br /&gt; /*placeholder:&amp;quot;555-456-7890&amp;quot;,*/&lt;br /&gt; value: fv!item.ContactNumber,&lt;br /&gt; saveInto: fv!item.ContactNumber,&lt;br /&gt; validations: {if(regexmatch(&lt;br /&gt; &amp;quot;^(\+\d{1,3}[- ]?)?\d{10}$&amp;quot;,&lt;br /&gt; fv!item.ContactNumber),&amp;quot;&amp;quot;,&amp;quot;provide valid contact number&amp;quot;)}&lt;br /&gt; &lt;br /&gt; /*validations:if(len(fv!item.ContactNumber)=10,&amp;quot;&amp;quot;,&amp;quot;please enter valid Number&amp;quot;)*/&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; ),&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; a!dateField(&lt;br /&gt; label: &amp;quot;Date Of Joining &amp;quot; &amp;amp; fv!index,&lt;br /&gt; value: fv!item.HireDate,&lt;br /&gt; saveInto: fv!item.HireDate,&lt;br /&gt; required:true,&lt;br /&gt; align: &amp;quot;RIGHT&amp;quot;&lt;br /&gt; ),&lt;br /&gt; /* For the Gender Column*/&lt;br /&gt; a!dropdownField(&lt;br /&gt; label: &amp;quot;Gender &amp;quot; &amp;amp; fv!index,&lt;br /&gt; placeholder: &amp;quot;-- Select -- &amp;quot;,&lt;br /&gt; choiceLabels: {&amp;quot;Male&amp;quot;,&amp;quot;Female&amp;quot;},&lt;br /&gt; choiceValues: {&amp;quot;Male&amp;quot;,&amp;quot;Female&amp;quot;},&lt;/p&gt;
&lt;p&gt;value: fv!item.Gender,&lt;br /&gt; saveInto: fv!item.Gender,&lt;br /&gt; required:true&lt;br /&gt; ),&lt;br /&gt; &lt;br /&gt; /* For the Removal Column*/&lt;br /&gt; a!richTextDisplayField(&lt;br /&gt; value: a!richTextIcon(&lt;br /&gt; icon: &amp;quot;trash-o&amp;quot;,&lt;br /&gt; altText: &amp;quot;delete &amp;quot; &amp;amp; fv!index,&lt;br /&gt; caption: &amp;quot;Remove &amp;quot; &amp;amp; fv!item.FirstName &amp;amp; &amp;quot; &amp;quot; &amp;amp; fv!item.LastName,&lt;br /&gt; link: a!dynamicLink(&lt;br /&gt; value: fv!index,&lt;br /&gt; saveInto: {&lt;br /&gt; &lt;br /&gt; if(&lt;br /&gt; isnull(fv!item.Id),&lt;br /&gt; {},&lt;br /&gt; a!save(local!deletedEmployeeIds,append(local!deletedEmployeeIds,fv!item.Id))&lt;br /&gt; &lt;br /&gt; ),&lt;br /&gt; a!save(ri!Del,true),&lt;br /&gt; a!save(ri!Del_Id,local!deletedEmployeeIds),&lt;br /&gt; a!save(local!Employeedata, remove(local!Employeedata, save!value))&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; }&lt;br /&gt; ),&lt;br /&gt; linkStyle: &amp;quot;STANDALONE&amp;quot;,&lt;br /&gt; color: &amp;quot;NEGATIVE&amp;quot;&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; }&lt;br /&gt; )&lt;br /&gt; ),&lt;br /&gt; selectionStyle: &amp;quot;ROW_HIGHLIGHT&amp;quot;,&lt;br /&gt; selectionRequired: false,&lt;br /&gt; addRowlink: a!dynamicLink(&lt;br /&gt; label: &amp;quot;Add Employee&amp;quot;,&lt;/p&gt;
&lt;p&gt;value: {&lt;br /&gt; &amp;#39;type!{urn:com:appian:types:ED}ED_Employee_Details_dt&amp;#39;()&lt;br /&gt; },&lt;br /&gt; saveInto: {&lt;br /&gt; a!save(local!Employeedata, append(local!Employeedata, save!value))&lt;br /&gt; }&lt;br /&gt; ),&lt;br /&gt; &lt;br /&gt; shadeAlternateRows: true,&lt;br /&gt; spacing: &amp;quot;STANDARD&amp;quot;,&lt;br /&gt; rowHeader: 1&lt;br /&gt; )&lt;br /&gt; &lt;br /&gt; },&lt;br /&gt; buttons: a!buttonLayout(&lt;br /&gt; primaryButtons: a!buttonWidget(&lt;br /&gt; label: &amp;quot;Submit&amp;quot;,&lt;br /&gt; saveInto: {a!save(ri!item,local!Employeedata)},&lt;br /&gt; submit: true,&lt;br /&gt; style: &amp;quot;PRIMARY&amp;quot;&lt;br /&gt; ),&lt;br /&gt; secondaryButtons: {&lt;br /&gt; a!buttonWidget(&lt;br /&gt; label: &amp;quot;Cancel&amp;quot;,&lt;br /&gt; value: true,&lt;br /&gt; saveInto: {ri!Cancel},&lt;br /&gt; submit: true,&lt;br /&gt; style: &amp;quot;NORMAL&amp;quot;,&lt;br /&gt; validate: false&lt;br /&gt; )&lt;br /&gt; }&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;can you help me how to implement&amp;nbsp; your code in my code ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94273?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 18:40:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:be6caf7e-8417-4c65-8bb1-65f208a618e4</guid><dc:creator>Dimitris Soulovaris</dc:creator><description>&lt;p&gt;Just copy and paste the code in an empty interface and you will find it out &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94272?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 17:24:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:47684605-4af2-49ee-b5ba-a0772a4fe506</guid><dc:creator>Nishtha</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a class="internal-link view-user-profile" href="/members/danny.verb"&gt;Danny&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks a lot for reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Nishtha&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94271?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 17:23:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5e70007b-2e33-4e89-a958-5b6fcc1aac36</guid><dc:creator>Nishtha</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a class="internal-link view-user-profile" href="/members/dimitriss99"&gt;Dimitris&amp;nbsp;&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for reply .Appreciate if you can show how to use this function&amp;nbsp; .&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Nishtha&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94268?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 15:47:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:21fe1769-675f-4861-a2e6-168edf663907</guid><dc:creator>Dimitris Soulovaris</dc:creator><description>&lt;p&gt;On top of what Danny proposed as a solution, you can create the pagination functionality itself as a common component for use also in other Grids.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You only have to create a generic interface with only 3 rule inputs:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;startIndex (int)&lt;/strong&gt;:&amp;nbsp; pass the pagingInfo.startIndex,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;batchSize (int)&lt;/strong&gt;: pass the pagingInfo.batshSize,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;totalCount (int)&lt;/strong&gt;: pass the local!datasubset.data&lt;/p&gt;
&lt;p&gt;and make a call of this common interface after your grid and you will be fine.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  a!sideBySideLayout(
    items: {
      a!sideBySideItem(
        item: a!richTextDisplayField(
          align: &amp;quot;RIGHT&amp;quot;,
          value: {
            /* Left Angle */
            a!richTextIcon(
              icon: &amp;quot;angle-double-left&amp;quot;,
              link: a!dynamicLink(
                saveInto: {
                  a!save(ri!startIndex, 1),                  
                },
                showWhen: ri!startIndex &amp;lt;&amp;gt; 1
              ),
              linkStyle: &amp;quot;STANDALONE&amp;quot;,
              color: if(
                ri!startIndex &amp;lt;&amp;gt; 1,
                &amp;quot;STANDARD&amp;quot;,
                &amp;quot;SECONDARY&amp;quot;
              )
            ),
            a!richTextIcon(
              icon: &amp;quot;angle-left&amp;quot;,
              link: a!dynamicLink(
                showWhen: ri!startIndex &amp;lt;&amp;gt; 1,
                saveInto: a!save(
                  ri!startIndex,
                  ri!startIndex - ri!batchSize
                )
              ),
              linkStyle: &amp;quot;STANDALONE&amp;quot;,
              color: if(
                ri!startIndex &amp;lt;&amp;gt; 1,
                &amp;quot;STANDARD&amp;quot;,
                &amp;quot;SECONDARY&amp;quot;
              )
            ),
            /* Start Index */
            a!richTextItem(
              text: {
                ri!startIndex, 
                &amp;quot; - &amp;quot;,
                if(
                  ri!startIndex + ri!batchSize - 1 &amp;gt; ri!totalCount,
                  ri!totalCount,
                  ri!startIndex + ri!batchSize - 1
                )
              },
              style: &amp;quot;STRONG&amp;quot;
            ),
            /* Total Count */
            a!richTextItem(
              text: {
                &amp;quot; of &amp;quot;, 
                ri!totalCount
              }
            ),
            /* Right Angle */
            a!richTextIcon(
              icon: &amp;quot;angle-right&amp;quot;,
              link: a!dynamicLink(
                showWhen: (ri!startIndex + ri!batchSize - 1) &amp;lt; ri!totalCount,
                label: &amp;quot;&amp;quot;,
                saveInto: a!save(
                  ri!startIndex,
                  ri!startIndex + ri!batchSize
                )
              ),
              linkStyle: &amp;quot;STANDALONE&amp;quot;,
              color: if(                
                ri!startIndex + ri!batchSize - 1 &amp;lt; ri!totalCount,                
                &amp;quot;STANDARD&amp;quot;,
                &amp;quot;SECONDARY&amp;quot;
              )           
            ),
            a!richTextIcon(
              icon: &amp;quot;angle-double-right&amp;quot;,
              link: a!dynamicLink(
                saveInto: {
                  a!save(
                    ri!startIndex, 
                    if(
                      mod(ri!totalCount, ri!batchSize) = 0,
                      ri!totalCount - ri!batchSize + 1,
                      ri!totalCount - mod(ri!totalCount, ri!batchSize) + 1
                    )
                  )
                },
                showWhen: ri!startIndex + ri!batchSize - 1 &amp;lt; ri!totalCount
              ),
              linkStyle: &amp;quot;STANDALONE&amp;quot;,
              color: if(                
                ri!startIndex + ri!batchSize - 1 &amp;lt; ri!totalCount,                
                &amp;quot;STANDARD&amp;quot;,
                &amp;quot;SECONDARY&amp;quot;
              )
            )
          }
        )
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pagination in Editable Grid</title><link>https://community.appian.com/thread/94261?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 13:59:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b7077bfa-c7c6-4294-8d6d-95040520def6</guid><dc:creator>Danny Verb</dc:creator><description>&lt;p&gt;1. You need to add your own custom paging below the grid which will update what gets queried&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
    local!listPagingInfo: a!pagingInfo(startIndex: 1, batchSize: 5),
    /* Instead of todatasubset just use your own query */
    local!pagedList: todatasubset( /*Data*/, local!listPagingInfo),
    {
      {
        a!gridLayout(
          label: &amp;quot;Data&amp;quot;,
          rows: a!forEach(
            local!pagedList,
            a!gridRowLayout(
              /*contents*/
            )
          )
        )
        a!richTextDisplayField(
          value: {
            a!richTextIcon(
              icon: &amp;quot;angle-double-left&amp;quot;,
              link: a!dynamicLink(
                saveInto: {
                  a!save(local!listPagingInfo.startIndex, 1),
                  a!save(
                    local!pagedList,
                    todatasubset(arrayToPage: /*Data*/, pagingConfiguration: local!listPagingInfo)
                  )
                },
                showWhen: local!listPagingInfo.startIndex &amp;lt;&amp;gt; 1
              ),
              linkStyle: &amp;quot;STANDALONE&amp;quot;,
              color: if(
                local!listPagingInfo.startIndex &amp;lt;&amp;gt; 1,
                &amp;quot;STANDARD&amp;quot;,
                &amp;quot;SECONDARY&amp;quot;
              ),
              size: &amp;quot;MEDIUM&amp;quot;
            ),
            a!richTextIcon(
              icon: &amp;quot;angle-left&amp;quot;,
              link: a!dynamicLink(
                saveInto: {
                  a!save(
                    local!listPagingInfo.startIndex,
                    if(
                      local!listPagingInfo.startIndex - local!listPagingInfo.batchSize &amp;lt; 1,
                      1,
                      local!listPagingInfo.startIndex - local!listPagingInfo.batchSize
                    )
                  )
                },
                showWhen: local!listPagingInfo.startIndex &amp;lt;&amp;gt; 1
              ),
              linkStyle: &amp;quot;STANDALONE&amp;quot;,
              color: if(
                local!listPagingInfo.startIndex &amp;lt;&amp;gt; 1,
                &amp;quot;STANDARD&amp;quot;,
                &amp;quot;SECONDARY&amp;quot;
              ),
              size: &amp;quot;MEDIUM&amp;quot;
            ),
            &amp;quot; &amp;quot;,
            a!richTextItem(
              text: {
                local!listPagingInfo.startIndex,
                &amp;quot; - &amp;quot;,
                if(
                  local!listPagingInfo.startIndex + local!listPagingInfo.batchSize - 1 &amp;gt; local!pagedList.totalCount,
                  local!pagedList.totalCount,
                  local!listPagingInfo.startIndex + local!listPagingInfo.batchSize - 1
                )
              },
              size: &amp;quot;MEDIUM&amp;quot;,
              style: &amp;quot;STRONG&amp;quot;
            ),
            a!richTextItem(
              text: {
                &amp;quot; of &amp;quot;,
                fixed(local!pagedList.totalCount, 0)
              },
              size: &amp;quot;MEDIUM&amp;quot;
            ),
            &amp;quot; &amp;quot;,
            a!richTextIcon(
              icon: &amp;quot;angle-right&amp;quot;,
              link: a!dynamicLink(
                saveInto: {
                  a!save(
                    local!listPagingInfo,
                    a!pagingInfo(
                      startIndex: local!listPagingInfo.startIndex + local!listPagingInfo.batchSize,
                      batchSize: local!listPagingInfo.batchSize
                    )
                  )
                },
                showWhen: local!listPagingInfo.startIndex + local!listPagingInfo.batchSize - 1 &amp;lt; local!pagedList.totalCount
              ),
              linkStyle: &amp;quot;STANDALONE&amp;quot;,
              color: if(
                local!listPagingInfo.startIndex + local!listPagingInfo.batchSize - 1 &amp;lt; local!pagedList.totalCount,
                &amp;quot;STANDARD&amp;quot;,
                &amp;quot;SECONDARY&amp;quot;
              ),
              size: &amp;quot;MEDIUM&amp;quot;
            ),
            a!richTextIcon(
              icon: &amp;quot;angle-double-right&amp;quot;,
              link: a!dynamicLink(
                saveInto: {
                  a!save(
                    local!listPagingInfo.startIndex,
                    /* When jumping to the last page, make sure that the startIndex is an even multiple of batch size. *
                     * This ensures that you have the same last page as if you had gotten there one page at a time.    */
                    if(
                      mod(local!pagedList.totalCount, local!listPagingInfo.batchSize) = 0,
                      local!pagedList.totalCount - local!listPagingInfo.batchSize + 1,
                      local!pagedList.totalCount - mod(local!pagedList.totalCount, local!listPagingInfo.batchSize) + 1
                    )
                  )
                },
                showWhen: local!listPagingInfo.startIndex + local!listPagingInfo.batchSize - 1 &amp;lt; local!pagedList.totalCount
              ),
              linkStyle: &amp;quot;STANDALONE&amp;quot;,
              color: if(
                local!listPagingInfo.startIndex + local!listPagingInfo.batchSize - 1 &amp;lt; local!pagedList.totalCount,
                &amp;quot;STANDARD&amp;quot;,
                &amp;quot;SECONDARY&amp;quot;
              ),
              size: &amp;quot;MEDIUM&amp;quot;
            )
          }
        )
      }
    }
  )&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2. Since the editable grid doesn&amp;#39;t have sorting, You could build sorting just above your grid using a sidebysidelayout and rich text items.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>