Local Structure List Navigation and Sorting

Local Structure List Navigation and Sorting

  

Hello,

I'am in need of sorting/ordering/filtering a local record list such as we do in aggregates.
But this actions will need to be done localy, and not as a query parameter as usual.

I have 2 problems:

1st - My list_navigation_getstartindex() is returning only the value 0;

2nd - I'm using the action ListSort and it's working for integer/date values but not for a signed decimal.


Any one got any idea of what's the problem.

Thanks!

Solution

Hi,

For first problem, are you passing the proper widget id? It's hard to guess why it is returning 0 without a detailed description / an oml file.

For the second problem, do you use multiple sorts in one sort statement (using if's?) If so, you should check out this post.

Sam

Solution

Filipe,

To sort the list try this component:

https://www.outsystems.com/forge/component/22/sortrecordlist

Filipe Cardoso wrote:

Hello,

I'am in need of sorting/ordering/filtering a local record list such as we do in aggregates.
But this actions will need to be done localy, and not as a query parameter as usual.

I have 2 problems:

1st - My list_navigation_getstartindex() is returning only the value 0;

2nd - I'm using the action ListSort and it's working for integer/date values but not for a signed decimal.


Any one got any idea of what's the problem.

Thanks!

Hi Filipe, did you involve your List and List navigation on a container?

Usually, when you don't put both inside the same container and refresh this container with both widgets, they don't work well


Sam Rijkers wrote:

Hi,

For first problem, are you passing the proper widget id? It's hard to guess why it is returning 0 without a detailed description / an oml file.

For the second problem, do you use multiple sorts in one sort statement (using if's?) If so, you should check out this post.

Sam


The first problem was the container and the table names were too similar. I was passing the wrong Id.

The second I used the post and probably the SortList function tries to identify the type of data that will be used to sort, in order to use the right comparison algorythm. Since I was using different types for the same SortList Action it was working for some Data Type and not for the others.

Hi Filipe,

Good to hear you solved it, and tanks for giving feedback.