<?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>Paging Grid - Pagination on Click</title><link>https://community.appian.com/discussions/f/user-interface/12338/paging-grid---pagination-on-click</link><description>Hello, 
 I have a grid field where I am fetching only 20 records into the datasubset and displaying in a paging grid. However, when I go to the next page for larger data sets (eg: 30 records) I still see the old dataset records on the next page. How do</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/55089?ContentTypeID=1</link><pubDate>Mon, 14 May 2018 05:35:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c38ccd61-821d-46b3-ad2f-a15185341243</guid><dc:creator>Aditya</dc:creator><description>Declare your local!rowData inside load and then see. I think it should work then.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/55088?ContentTypeID=1</link><pubDate>Mon, 14 May 2018 05:28:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:11a029ea-40eb-4360-99af-7145b5124ea8</guid><dc:creator>bpmnewb</dc:creator><description>Hi  ,&lt;br /&gt;
Yes, I am able to save the grid selected row data into a local variable (local!rowData). I would need to display the entire selected row data in a section layout which I am not able to do so as I have a grid field (data subset on search button) within a section layout and not able to display selected row data in another section layout within as below: &lt;br /&gt;
&lt;br /&gt;
 a!sectionLayout(&lt;br /&gt;
     contents: {&lt;br /&gt;
         a!gridField(&lt;br /&gt;
      label: &amp;quot;Expedite Line Section&amp;quot;,&lt;br /&gt;
        totalCount: if(local!datasubset.totalCount=0,1,local!datasubset.totalCount),&lt;br /&gt;
        emptyGridMessage: &amp;quot;Please enter a valid number order number to search for eligible lines &amp;quot;,&lt;br /&gt;
        columns: {&lt;br /&gt;
        a!gridTextColumn(&lt;br /&gt;
          label:&amp;quot;Line Number&amp;quot;,&lt;br /&gt;
          field:&amp;quot;line_number&amp;quot;,&lt;br /&gt;
          data:index(local!datasubset.data,&amp;quot;line_number&amp;quot;,&amp;quot;&amp;quot;)&lt;br /&gt;
        ),&lt;br /&gt;
         a!gridTextColumn(&lt;br /&gt;
          label:&amp;quot;Order Number&amp;quot;,&lt;br /&gt;
          field:&amp;quot;order_number&amp;quot;,&lt;br /&gt;
          data:index(local!datasubset.data,&amp;quot;order_number&amp;quot;,&amp;quot;&amp;quot;)&lt;br /&gt;
        )&lt;br /&gt;
      },&lt;br /&gt;
        identifiers:index(local!datasubset.data, &amp;quot;line_id&amp;quot; ,  &amp;quot;{}&amp;quot;),&lt;br /&gt;
      value: local!gridSelection,&lt;br /&gt;
          saveInto: {&lt;br /&gt;
            local!gridSelection,&lt;br /&gt;
            a!save(&lt;br /&gt;
              local!rowData,&lt;br /&gt;
              index(local!datasubset.data,&lt;br /&gt;
              wherecontains(&lt;br /&gt;
      local!gridSelection.selected,&lt;br /&gt;
      local!datasubset.identifiers&lt;br /&gt;
    ),{})&lt;br /&gt;
            )&lt;br /&gt;
          },&lt;br /&gt;
       showWhen: if(index(local!datasubset,&amp;quot;totalCount&amp;quot;,&amp;quot;&amp;quot;) &amp;gt;0,true(),false()),&lt;br /&gt;
       selection:if(index(local!datasubset,&amp;quot;totalCount&amp;quot;,&amp;quot;&amp;quot;) &amp;gt;0,true,false)&lt;br /&gt;
    ),&lt;br /&gt;
    a!textField(&lt;br /&gt;
      label: &amp;quot;Row Data&amp;quot;,&lt;br /&gt;
      value: local!rowData&lt;br /&gt;
    )&lt;br /&gt;
     }&lt;br /&gt;
   )&lt;br /&gt;
&lt;br /&gt;
As above, I can see the selected row data set in the text field but I would need to display it in another section layout. &lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/55086?ContentTypeID=1</link><pubDate>Mon, 14 May 2018 05:04:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c0852c69-0aaa-4fd9-98b9-17e4b1c1e4bb</guid><dc:creator>Aditya</dc:creator><description>&lt;p&gt;Are you able to save your grid row data in a local variable or a rule input upon selecting a particular row?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/55085?ContentTypeID=1</link><pubDate>Mon, 14 May 2018 04:52:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f48766f9-3847-48fc-bdfb-61d7f72c6544</guid><dc:creator>bpmnewb</dc:creator><description>Hi  ,&lt;br /&gt;
&lt;br /&gt;
I am now able to implement pagination in grid field with no issues. However, I do have an issue in saving the entire selected row data in a grid. As I am using a form layout and displaying the gridfield in with(), I am not able to display another section layouts dependent on the grid field selection. How do I wrap multiple UI components in a with()? Eg: gridfield and multiple section layouts in a form layout&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/55084?ContentTypeID=1</link><pubDate>Mon, 14 May 2018 03:20:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0d733b08-a0fe-4ed9-851c-32ca6eccbcb2</guid><dc:creator>bpmnewb</dc:creator><description>Hi &lt;a href="/members/venkateshamu"&gt;venkateshamu&lt;/a&gt; , &lt;br /&gt;
&lt;br /&gt;
I am able to display the pagination in grid now. Thanks for the inputs. &lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/55082?ContentTypeID=1</link><pubDate>Mon, 14 May 2018 00:35:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cbd6414b-30aa-49f3-ac76-dc5e6a6de925</guid><dc:creator>bpmnewb</dc:creator><description>Hello &lt;a href="/members/venkateshamu"&gt;venkateshamu&lt;/a&gt; ,&lt;br /&gt;
Thanks for inputs. I am using the above logic as you mentioned but I am getting an error with &amp;#39;WITH&amp;#39; function. &lt;br /&gt;
&lt;br /&gt;
Below is code: &lt;br /&gt;
&lt;br /&gt;
    a!buttonLayout(&lt;br /&gt;
      primaryButtons: {&lt;br /&gt;
        a!buttonWidget(&lt;br /&gt;
          label: &amp;quot;Search&amp;quot;,&lt;br /&gt;
          saveInto: {&lt;br /&gt;
            /*a!save(local!dataSubset,rule!GetData(ri!orders.order_number,local!pagingInfo)),*/&lt;br /&gt;
            a!save(local!expDataSubset,rule!EXP_GetExpeditedLines(local!expdPagingInfo,ri!orders.order_number))&lt;br /&gt;
          },&lt;br /&gt;
          style: &amp;quot;NORMAL&amp;quot;,&lt;br /&gt;
          disabled: isnull(ri!orders.order_number)&lt;br /&gt;
        )&lt;br /&gt;
      },&lt;br /&gt;
      secondaryButtons: {}&lt;br /&gt;
    ),&lt;br /&gt;
    with(&lt;br /&gt;
     local!dataSubset:todatasubset(rule!GetData(ri!orders.order_number,local!gridSelection.pagingInfo),&lt;br /&gt;
         a!gridField(&lt;br /&gt;
      label: &amp;quot;Line Section&amp;quot;,&lt;br /&gt;
        totalCount: if(local!datasubset.totalCount=0,1,local!datasubset.totalCount),&lt;br /&gt;
        columns: {&lt;br /&gt;
        a!gridTextColumn(&lt;br /&gt;
          label:&amp;quot;Line Number&amp;quot;,&lt;br /&gt;
          field:&amp;quot;line_number&amp;quot;,&lt;br /&gt;
          data:index(local!dataSubset.data,&amp;quot;line_number&amp;quot;,&amp;quot;&amp;quot;)&lt;br /&gt;
        ),&lt;br /&gt;
         a!gridTextColumn(&lt;br /&gt;
          label:&amp;quot;Order Number&amp;quot;,&lt;br /&gt;
          field:&amp;quot;order_number&amp;quot;,&lt;br /&gt;
          data:index(local!dataSubset.data,&amp;quot;order_number&amp;quot;,&amp;quot;&amp;quot;)&lt;br /&gt;
        )&lt;br /&gt;
        identifiers:index(local!dataSubset.data, &amp;quot;line_id&amp;quot; ,  &amp;quot;{}&amp;quot;),&lt;br /&gt;
      value: local!gridSelection,&lt;br /&gt;
          saveInto: {&lt;br /&gt;
            local!gridSelection,&lt;br /&gt;
            a!save(&lt;br /&gt;
              local!rowData,&lt;br /&gt;
              index(local!dataSubset.data,&lt;br /&gt;
              wherecontains(&lt;br /&gt;
      local!gridSelection.selected,&lt;br /&gt;
      local!dataSubset.identifiers&lt;br /&gt;
    ),{})&lt;br /&gt;
            )&lt;br /&gt;
          },&lt;br /&gt;
       showWhen: if(local!dataSubset.totalCount &amp;gt;0,true(),false()),&lt;br /&gt;
       selection:if(local!dataSubset.totalCount &amp;gt;0,true,false)&lt;br /&gt;
    )) &lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
Error Description: With expects final parameter to be its result value, not a definition of local variable &amp;#39;local!dataSubset&amp;#39;. Not sure where I am going wrong?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/54930?ContentTypeID=1</link><pubDate>Tue, 08 May 2018 14:31:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4d40039e-019e-4de4-b12f-aea8fb7af11b</guid><dc:creator>PhilB</dc:creator><description>Using a with in this situation is not best practice; you should use the saveInto on the grid to first store the paging info and then to retrieve the next page.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/54916?ContentTypeID=1</link><pubDate>Tue, 08 May 2018 13:48:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8bc48c1c-efd9-4e0c-8fe7-c1eb1d92fbf4</guid><dc:creator>Anna Pol</dc:creator><description>I agree with venkateshamu, if you use button to fetch data and fetch all data at a time then i will take time to fetch data.. better you just fetch data in with function with required pagingInfo, paging grid will take care to show your data.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/54721?ContentTypeID=1</link><pubDate>Thu, 03 May 2018 11:07:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:abff9316-a755-45f3-9fa6-de6ac1f372b2</guid><dc:creator>venkateshamu</dc:creator><description>Hi bpmnewb,&lt;br /&gt;
&lt;br /&gt;
Solution 1 : Fetch everything on button click with paginginfo(1,-1) and call todatasubset with local!gridselection.paginginfo as adithyaU suggested.&lt;br /&gt;
&lt;br /&gt;
Solution 2: Call the rule!GetData  inside the with like below.&lt;br /&gt;
with(&lt;br /&gt;
 local!datasubset: rule!GetData(ri!number, local!gridselection.paginginfo),&lt;br /&gt;
gricd component&lt;br /&gt;
 ).&lt;br /&gt;
&lt;br /&gt;
I&amp;#39;ll prefer to use 2nd solution as it improves the performance.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/54680?ContentTypeID=1</link><pubDate>Thu, 03 May 2018 05:32:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:811eafee-bd9c-4bbf-b34a-b19a844efa35</guid><dc:creator>Aditya</dc:creator><description>&lt;p&gt;Hi bpmnewb ,&lt;br /&gt; &lt;br /&gt; In your code,&lt;br /&gt; &lt;br /&gt; a!buttonLayout(&lt;br /&gt; primaryButtons: {&lt;br /&gt; a!buttonWidget(&lt;br /&gt; label: &amp;quot;Query&amp;quot;,&lt;br /&gt; saveInto: {&lt;br /&gt; a!save(local!dataSubset,rule!GetData(ri!number,local!pagingInfo))&lt;br /&gt; },&lt;br /&gt; style: &amp;quot;NORMAL&amp;quot;&lt;br /&gt; )&lt;br /&gt; },&lt;br /&gt; secondaryButtons: {}&lt;br /&gt; )&lt;/p&gt;
&lt;p&gt;Your local!dataSubset should be inside a with() and the local!pagingInfo should be same as local!gridSelection.pagingInfo.&lt;/p&gt;
&lt;p&gt;So you have to use a todatasubset(local!dataSubset,local!gridSelection.pagingInfo) inside your with() function&amp;nbsp;and save it in another local variable say &amp;#39;local!gridData&amp;#39;.&lt;/p&gt;
&lt;p&gt;Then replace local!dataSubset with local!gridData&amp;nbsp;at all places inside your a!gridField().&lt;/p&gt;
&lt;p&gt;The code should be like:&lt;/p&gt;
&lt;p&gt;with(&lt;/p&gt;
&lt;p&gt;local!gridData:todatasubset(local!dataSubset,local!gridSelection.pagingInfo),&lt;/p&gt;
&lt;p&gt;a!gridField(/*Replace local!dataSubset with local!gridData at all places*/)&lt;/p&gt;
&lt;p&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/54673?ContentTypeID=1</link><pubDate>Thu, 03 May 2018 01:03:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d477224d-f422-400b-b816-13243ed28580</guid><dc:creator>bpmnewb</dc:creator><description>Hi &lt;a href="/members/venkateshamu"&gt;venkateshamu&lt;/a&gt; , &lt;br /&gt;
Variable local!datasubset is the result data set from the query rule on a button component in the UI like below. &lt;br /&gt;
&lt;br /&gt;
 a!buttonLayout(&lt;br /&gt;
      primaryButtons: {&lt;br /&gt;
        a!buttonWidget(&lt;br /&gt;
          label: &amp;quot;Query&amp;quot;,&lt;br /&gt;
          saveInto: {&lt;br /&gt;
            a!save(local!dataSubset,rule!GetData(ri!number,local!pagingInfo))&lt;br /&gt;
          },&lt;br /&gt;
          style: &amp;quot;NORMAL&amp;quot;&lt;br /&gt;
        )&lt;br /&gt;
      },&lt;br /&gt;
      secondaryButtons: {}&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/54649?ContentTypeID=1</link><pubDate>Wed, 02 May 2018 13:13:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:66f23539-7e75-4c74-9c1f-8301d0a77625</guid><dc:creator>venkateshamu</dc:creator><description>How you are creating the local!datasubset variable. Please check below  sample code&lt;br /&gt;
&lt;br /&gt;
load(&lt;br /&gt;
local!gridSelection: a!gridSelection(&lt;br /&gt;
pagingInfo: a!pagingInfo(&lt;br /&gt;
startIndex: 1,&lt;br /&gt;
batchSize: 20,&lt;br /&gt;
sort:a!sortInfo(&lt;br /&gt;
field:&amp;quot;line_id&amp;quot;&lt;br /&gt;
)&lt;br /&gt;
),&lt;br /&gt;
selected: {}&lt;br /&gt;
),&lt;br /&gt;
with(&lt;br /&gt;
local!dataSubset: todataSubset(&lt;br /&gt;
your data varaible,             &lt;br /&gt;
local!gridSelection.pagingInfo&lt;br /&gt;
), --- It may be rule which takes paginginfo as rule input&lt;br /&gt;
here paging grid logic&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
 )&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/54647?ContentTypeID=1</link><pubDate>Wed, 02 May 2018 12:50:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7d679c56-cb97-427d-8e91-66762689dbfb</guid><dc:creator>Carlos Santander</dc:creator><description>Take a look at this SAIL Recipe: &lt;a href="https://docs.appian.com/suite/help/18.1/recipe_display_array_of_data_in_a_grid.html"&gt;docs.appian.com/.../recipe_display_array_of_data_in_a_grid.html&lt;/a&gt;. In that recipe, local!data is the entire data set (the equivalent to your local!datasubset) . The subset to show in the grid is local!datasubset. I think you should be able to use that as a starting point for your own code.&lt;br /&gt;
&lt;br /&gt;
For selection, take a look at this SAIL Recipe: &lt;a href="https://docs.appian.com/suite/help/18.1/recipe_select_rows_in_a_grid.html"&gt;docs.appian.com/.../recipe_select_rows_in_a_grid.html&lt;/a&gt;.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/54637?ContentTypeID=1</link><pubDate>Wed, 02 May 2018 09:26:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2187048a-ac42-4fff-8b0d-3088409597f3</guid><dc:creator>Aditya</dc:creator><description>are you paging your local!dataSubSet with the grid&amp;#39;s pagingInfo?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/54623?ContentTypeID=1</link><pubDate>Tue, 01 May 2018 23:30:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:57966d94-be44-4fa0-896a-09d117d9ae06</guid><dc:creator>bpmnewb</dc:creator><description>Hi Carlos, &lt;br /&gt;
But, I do have a select (checkbox) component for every row in the grid selection and I am saving the selected rows from the datasubset into local!rowData. Sorry, can you explain a bit more on what variable needs to be used when updating when we page?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Paging Grid - Pagination on Click</title><link>https://community.appian.com/thread/54617?ContentTypeID=1</link><pubDate>Tue, 01 May 2018 20:30:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8e116c37-4cc4-45d4-bea7-7cdab7c66b37</guid><dc:creator>Carlos Santander</dc:creator><description>You&amp;#39;re updating local!rowData in the saveInto of the grid, but you continue using local!dataSubset in the grid column. You have to use the variable that you&amp;#39;re updating when you page.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>