48
Views
4
Comments
Solved
Need help to get. page number from pagination
Question

Hi Team,

I try to get page number from Navigation/Pagination but not able to get. on click of next page i am able to reset start index but not bale to get which page number. i need to store that page number in loacl variables.  

Please suggest how we will find page number and store in local variable.

POC help me better way.

2024-08-07 06-05-18
Damini Rajput
Solution

Hello @Prince Kumar,

To save the current "PageNumber" in a local variable, you should use this formula. It will give you the current page number.  I added the formula on the onAfterFetch.

Here as you can see, if the list is empty it will set the value of "PageNumber = 0", otherwise we can get the value according to the page number.

And in the case of empty list the PageNumber will be 0.

Please refer to the attached screenshots for better understanding.

2019-01-07 16-04-16
Siya
 
MVP

Create a variable called PageNumber (type: Integer, Default Value: 1).

In OnPaginationNavigate, assign this: PageNumber = NewStartIndex / MaxRecords + 1.

If needed, add OnAfterFetch to set PageNumber = 0 when there are no records.


UserImage.jpg
Prince Kumar

Thanks for your response.  

2024-08-07 06-05-18
Damini Rajput
Solution

Hello @Prince Kumar,

To save the current "PageNumber" in a local variable, you should use this formula. It will give you the current page number.  I added the formula on the onAfterFetch.

Here as you can see, if the list is empty it will set the value of "PageNumber = 0", otherwise we can get the value according to the page number.

And in the case of empty list the PageNumber will be 0.

Please refer to the attached screenshots for better understanding.

UserImage.jpg
Prince Kumar

Thanks @Damini Rajput its Work form me

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.