Hi everyone,

I am using a list navigation widget with functions to allow the user to delete items.  When the user deletes everything on the last page (say page 2), is it possible to change the user's active page to page 1 since there is nothing to show on page 2?

Hi JX,

This is partly possible with the function 'List_Navigation_ResetStartIndex'. With this function you reset the startindex to the first page in all cases.

Kind regards,

Remco Dekkinga

Hi JX,

As Remko has said you can go to the first page with the 'List_Navigation_ResetStartIndex' function.

For a more general solution (where it goes to the previous page when the current page is empty) you have to:

  • Have a variable that has at every moment the total number of records
  • Detect that that page is empty by using the List.Lenght property of the Table
  • When the page is empty compute the index of the previous page (using the current index and the total number of records) and use that value in the last parameter of the  'List_Navigation_GetStartIndex' function to set the index properly

I have attached an oml with this.

See if that works for you.




Thanks, I was able to get it working as suggested:

1) check if the table list.empty is true

2) if true, then set 

SyntaxEditor Code Snippet

List_Navigation_GetStartIndex(Table.id, False, List_Navigation_GetStartIndex(Table.Id, False) - Table.LineCount)