Developing on 11.7.4 (Mobile and Reactive app (both give the same result)


At this moment I am developing search together with pagination. When I am searching any of my filter criteria on the first page everything is working fine, but when navigating to another page (for example page 22 out of 24) and do the same search there, then no results are returned (but the count seems to be 1 so to me it seems that a result is found). When I remove the pagination everything works as expected. That is one of the reasons I think the pagination is causing this issue. I am not sure what is causing this problem and I hope you could help me find a solution to this problem. If you need more information that I did not put into this thread, please met me know!


Search "Koers" on page 1:


Search "Koers" on page 22: 

This is the aggregate that is showed on the screen. I did follow the steps on https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Creating_and_editing_Tables/Table_pagination_and_sorting to create pagination. 

Both the local variables that I did create:


The flow for getting the pagination to work properly:

Filter on the Aggregate to search on multiple columns in the table:

Solution

Hi Bart,

On the search action are you setting the StartIndex which are used on the pagination to 0?

Regards,

Marcelo

Solution

Marcelo Ferreira wrote:

Hi Bart,

On the search action are you setting the StartIndex which are used on the pagination to 0?

Regards,

Marcelo

Hi Marcelo,


You mean like this?



Hi Bart,

Yes like that, but on your second image after search the startIndex is 630. Also that variable you are setting to 0 is the one you use on the pagination?

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi Bart,

Yes like that, but on your second image after search the startIndex is 630. Also that variable you are setting to 0 is the one you use on the pagination?

Regards,

Marcelo

Hi Marcelo,


Let me see if I understand you correctly. This is the flow used on the pagination. I guess they are the same variable and I need to set it to NewStartIndex there so the pagination works. If I set it to 0 on that flow the pagination will not be working anymore. So if I understand correctly I only need to set it to 0 on the search flow right?



Hi Bart,

You are correct you only need to sett it to 0 on search. And if I look into your code yes it looks like the MyStartIndex is being set to 0. But that is not what I see in your page. From what I see on your page the value is still 630. Can you debug and check it? and try to understand why you see 630 in the screen?

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi Bart,

You are correct you only need to sett it to 0 on search. And if I look into your code yes it looks like the MyStartIndex is being set to 0. But that is not what I see in your page. From what I see on your page the value is still 630. Can you debug and check it? and try to understand why you see 630 in the screen?

Regards,

Marcelo

Hi Marcelo,


Sorry. I think I was not clear about that. I did the StartIndex to 0 in the search action after you told me to do that and now it seems to be working correct. I was just wondering if that was the correct way to implement it. Thanks for helping!

Hi Bart,

Yes that is the correct way. One way of checking that everything is correct is creating a webscreen with Outsystems templates. For example the LIst template is the one you want to check for your case.

Glad I could help.

Regards,

Marcelo