Anybody can explain use of a!paginginfo() Function?

s

  Discussion posts and replies are publicly visible

Parents
  • Following is the basic syntax for a!pagingInfo(), this function is used the display/fetch the fixed batches (rows) of data. This function basically have 3 mandatory parameter that are startIndex, batchSize and sort.

    startIndex (Integer): Index of the array in which to start returning values for the subset. Valid values include those greater than zero.

    batchSize (Integer): The number of items to return. Valid values include those greater than or equal to -1.

    sort (SortInfo Array): Valid values include null, an empty array of SortInfo, or an array of SortInfo where <SortInfo>.field is the name of a field on the input array elements or "dot" notation for a nested field.
    a!pagingInfo( startIndex, batchSize, sort )

    Similar we have a topaginginfo() function which don't allow to pull sorted data.
    topaginginfo( startIndex, batchSize )


    More info please visit the URL:
    docs.appian.com/.../fnc_system_a_paginginfo.html
    docs.appian.com/.../fnc_scripting_topaginginfo.html
  • Interesting. Any idea why we don't have sort functionality in topaginginfo() ?
  • I can explain with an example, if I don't pass SortInfo in for some of the cases I have found that some of the rows were not displaying in the grid and instead of this topaginginfo() will returning the correct data in grid. When I started the investigation when I found that we should have to pass the value for sort parameter of function a!pagingInfo( startIndex, batchSize, sort ).

    In that case what is happening, the sort is automatically changed by clicking on pagination and this is causing the improper display of data in grid. Basically topaginginfo() sort the data automatically to increasing order of primary key. But that was not the case for a!pagingInfo(). I guess some performance factor is also there but I am enable to validate the same.
Reply
  • I can explain with an example, if I don't pass SortInfo in for some of the cases I have found that some of the rows were not displaying in the grid and instead of this topaginginfo() will returning the correct data in grid. When I started the investigation when I found that we should have to pass the value for sort parameter of function a!pagingInfo( startIndex, batchSize, sort ).

    In that case what is happening, the sort is automatically changed by clicking on pagination and this is causing the improper display of data in grid. Basically topaginginfo() sort the data automatically to increasing order of primary key. But that was not the case for a!pagingInfo(). I guess some performance factor is also there but I am enable to validate the same.
Children
No Data