Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
6 replies
Subscribers
10 subscribers
Views
6148 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Anybody can explain use of a!paginginfo() Function?
tirumalar0001
over 6 years ago
s
Discussion posts and replies are publicly visible
0
Aditya GIll
over 6 years ago
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
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mohan Paruchuri
Certified Lead Developer
over 6 years ago
in reply to
Aditya GIll
PagingInfo for use with grids and record queries.
you can find more details in the below link
docs.appian.com/.../fnc_system_a_paginginfo.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rohinip91
over 6 years ago
a!pagingInfo in general terms is used to define
1)From what index the data to be displayed--this is achieved by startIndex parameter
2) how many records to be displayed --this is achieved by batchSize parameter
3) what order/field the data to be displayed---this is achieved by sort parameter
The return type of a!pagingInfo is PagingInfo
For detail info , please refer to the below link
docs.appian.com/.../fnc_system_a_paginginfo.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ravalik
A Score Level 1
over 6 years ago
HI tirumalar,
a!paging Info() function contains 3 parameters start Index, batch Size, sort which is used to fetch the data and is used to display the records i.e(batch size). sort can be used by a!sortinfo()
For example: your total Data set contains 500 items, but you only want to display 100 at a time. You set your paging info values to: startIndex:1, batchSize:100.
You display your grid, if you display your datasubset in a paragraph field, you'll see three important values:
datasubset.startIndex:1, datasubset.batchSize:100, datasubset.totalCount: 500,
If you page your grid to the next one hundred and examine your values, you'll see:
datasubset.startIndex:101, datasubset.batchSize:100, datasubset.totalCount:500
Thanks,
ravalik
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
anjup136
over 6 years ago
in reply to
Aditya GIll
Interesting. Any idea why we don't have sort functionality in topaginginfo() ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Aditya GIll
over 6 years ago
in reply to
anjup136
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.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel