List Navigation Issue with local variable

List Navigation Issue with local variable

  

Hi, i am having issue with pagination. I am using ListRecords to display the list and List_Navigation to display page numbers.  i have set GetStartIndex to ListRecords as shown below.

The "list" local variable is a structure list returned from another eSpace.

But when I navigate to next page, it is still showing the first page result. 

Is there anything missing or wrong? Appreciate your help.




Hello Aung


Probably you forgot to make a table refresh with ajax


Regards 

Hi Alberto,

I refresh with Ajax in List_Navigation Destination event.

Hi aung,

TotalRowCount of Navigation shouldn't be list.Length?

Regards,

Marcelo

Hello Aung,

The Assign where you get the output of the action and set to the list is triggering an optimization and the list does not hold all the values, but just the values for the first page.

You can use the output of the Action the same way you would use the output of an Aggregate, without needing the list. This will avoid this problem.

If you still need to use list for some reason, you can solve this with a ForEach and a ListAppend to each, instead of an Assignment (there I prefer the previous solution).

Cheers.

I think a ListDuplicate would be better than a ForEach / ListAppend.

Hi @Kilian, Yes, it is (I'm always forgetting about the List actions... rs)

Solution

Hi All, Apologies for my delay and I was struggling with deployment in last few days. In fact, I have found the root cause. The issue was that I was using list navigation component from forge (https://www.outsystems.com/forge/Component_Versions.aspx?ProjectId=911) instead of under RichWidgets. After removing list navigation reference, it is working fine now. 

Thanks a lot for your comments and suggestions. 

Solution

Thanks for the feedback Aung!