Get page number from list navigation widget

Can someone help me how to get the page number clicked from the list navigation menu? Thanks!

Hi Ma. Joy Aropon,

Use 

SyntaxEditor Code Snippet

List_Navigation_GetStartIndex

Server action available under rich widgets. Hope this will helps you.

Regards,

Koushik

Koushik Prathi wrote:

Hi Ma. Joy Aropon,

Use 

SyntaxEditor Code Snippet

List_Navigation_GetStartIndex

Server action available under rich widgets. Hope this will helps you.

Regards,

Koushik

Can you tell me more about it? thanks


Solution

Hi Ma, 

List_Navigaton_GetStartIndex doesn't return the actual page.
It returns only the StartIndex for the page (https://www.outsystems.com/forums/discussion/37002/how-the-pagination-navigation-widget-works/).

To get the page from this function, you need to pass the table id to it, and then use the value, together with the table records LineCount property (that tells how many records per page will be shown), and calculate in which page you are.
For example:

page = List_Navigation_GetStartIndex(MyTable.id) / MyTable.LineCount + 1

Not sure it will always work...

Cheers.

Solution

Thanks guys!

Eduardo Jauch wrote:

Hi Ma, 

List_Navigaton_GetStartIndex doesn't return the actual page.
It returns only the StartIndex for the page (https://www.outsystems.com/forums/discussion/37002/how-the-pagination-navigation-widget-works/).

To get the page from this function, you need to pass the table id to it, and then use the value, together with the table records LineCount property (that tells how many records per page will be shown), and calculate in which page you are.
For example:

page = List_Navigation_GetStartIndex(MyTable.id) / MyTable.LineCount + 1

Not sure it will always work...

Cheers.

Thank you!