Grid display batch size

I am trying to display a grid on the record dashboard with a batch size of 10

a!pagingInfo(
startIndex: 1,
batchSize: 10
)

but get an error on the summary view of the record dashboard as follows: 

A grid component [label=“Sess”] has an invalid value for “columns” and “value”. All “data” arrays must not contain more items than the specified “batchSize”, but “batchSize” was 10 and the largest column data array had 19 items. (APNX-1-4198-000)

 

When i change the code to batchSize: -1 then it shows the entire grid on the same page. But I want it in pages of 10. 

 

Any help would be appreciated. TIA!!

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer
    Hi Apoorva,

    You can achieve your requirement in two ways.
    1. Fetch the entire data and store it into a load variable. Now use a with variable where you derive the subset of data to be displayed on each page using todatasubset() function. now display the filtered data in your grid.
    2. use paging info as load variable and fetch the initial set of data using the paginginfo. Later in the grid saveInto along with saving the pagingInfo , fetch the new set of data using the fresh paging info and set it to the variable that is holding the initial set of data. This will automatically reflect the grid data with new set of data. This approach is suggested way to avoid the load on Appian if there is a huge amount of data that has to be shown. As you fetch chunks of data the performance will be good.

    Note:In both the approaches make sure that you are not using array of arrays in any column. This will be considered as flat array and may lead to mismatch of count of data. (for example: {{1,2},{3,4},5,6} will be treated as {1,2,3,4,5,6} while displaying in paging grid. In this case we assume the count to be 4 but paging grid considers it as 6 leading the count mismatch )
Reply
  • +1
    Certified Lead Developer
    Hi Apoorva,

    You can achieve your requirement in two ways.
    1. Fetch the entire data and store it into a load variable. Now use a with variable where you derive the subset of data to be displayed on each page using todatasubset() function. now display the filtered data in your grid.
    2. use paging info as load variable and fetch the initial set of data using the paginginfo. Later in the grid saveInto along with saving the pagingInfo , fetch the new set of data using the fresh paging info and set it to the variable that is holding the initial set of data. This will automatically reflect the grid data with new set of data. This approach is suggested way to avoid the load on Appian if there is a huge amount of data that has to be shown. As you fetch chunks of data the performance will be good.

    Note:In both the approaches make sure that you are not using array of arrays in any column. This will be considered as flat array and may lead to mismatch of count of data. (for example: {{1,2},{3,4},5,6} will be treated as {1,2,3,4,5,6} while displaying in paging grid. In this case we assume the count to be 4 but paging grid considers it as 6 leading the count mismatch )
Children
No Data