Hello team,

I have been absent for a while but now I'm back with a question.

I have a page with a Table Records with pagination. The thing is that when I leave the screen and return to it I want to be in the page I was when I left the screen. 

Everything in the filters are being saved in Session variables and I can use them again in the query when I open the screen again.

But the pagination I cant make it work. I have this in my Table Records 

I am not resetting the pagination widget so I don't understand what is happening.

The weird thing is that I have another eSpace when I use this and it is working ok.

Has this ever happened to you guys? do you have some hints?

Thanks in advance,

Vincent Colpa

Hello Vincent.

I don't recognize the function you are using to retrieve the StartIndex. Is it a Server Action you created?
If so, how is it logic?

Also, how is set the preparation of the page?



Yes, its integrated to use some different languages but If I use the original one ( ListNavigation_GetStartIndex ) It also does not work. The code is the same from the original one just the language is different.

This is my preparation:

I use the FixaPagina to define if I want to keep the same page of the source records... Then I load the List from the PesquiFaturas2 and assign it to the local variable that is associated with the Table Records.

The widget I use is this one:

List_Navigation and I'm using the function List_Navigation_GetStartindex() which has an attribute that is used for this. but I set it to yes and can't make it work

Thanks in advance,

Vincent Colpa

Hello Vincent,

Just a question.
Did you debug the code on page loading?

Are the FixaPagina returning false (resetting the page Start Index) or is it returning true, and even so, the page is not being kept?



that would be a rookie mistake => but yes everything is ok with the variables. It is odd that this is happening. Should I add something to my query? I'm confused... my FixaPagina goes true of course.

Thanks again ;)


I'm looking to your code and I think there is something strange about it...

See, the pagination works because when you use a TableRecords associated with an aggregate, before running the aggregate, the system goes look for the Start Index and Line Count in the Table Records. This way, when running the aggregate, the system optimizes it to go fetch only the number of records that will be shown, starting at the row defined in the TableRecords (in this case, a value returned by a function).

But when I look your preparation and the properties of the table records, what I am seeing is that the "list" that is the source of the table records is receiving its items from a Server Action (PesquisaFaturas2). Is that correct?

If so, I would say that it will not work, as the Server Action does not have access to the Table Records and will ignore the Start Index defined by the function in the Page.

Also, this will cause problems, as the system will not be able to optimize aggregates inside the Server Action...



Yes, I believe that is the reason. I'm using a local variable to fill the TableRecords that comes from that action yes. i will try to get a workaround for this. can't I manually save the page I'm at in a session and use it when I reopen the screen?


Vincent Colpa