14
Views
12
Comments
Solved
Local list is not sorted properly using ListSort function
Application Type
Traditional Web
Service Studio Version
11.9.1 (Build 33435)

Hello All,

Currently I am trying to create a page to show the total numbers of forms submitted for each category. So I have used aggregate to have 2 or 3 'group by' elements - FormName, FormTypeId (identifier datatype) and also 'Count' column and then listappend each of the record with another 2 variables - Phase and LaunchDate into the local list (a list with structure datatype, like attached screenshot below:). However, the existing list sort column widget is not working in my case. I think that is because I am not directly sorting through the aggregate, correct?

So now I am using an action to sort them, by passing the parameter(text of the column name) to that action. Both with or without the [] symbols in the parameter also work, but the list seems not sorted properly. The first row is always at the first row, the last row is always at the last row(e.g. letter 'V' should be the first row if in descending order but it is always at the last row, in the next list page).

Attached image is the first column in descending order (alphabetically) but not correct.

sortDescending.png

Rank: #481
Solution

Hi Junior,

Please refer below OML for your solution to sort local list.

Hope it works, Thanks ;)

SortLocalList.oml

Rank: #111

Hi,

All you have to do is sort by the group by column then you will see the output sorted. for example below I need the output in descending order sorted on created date

Regards,

Rank: #502

Hi,

You can try to use the ListSort function on the local list variable instead. The aggregate with Group By is not work correctly in some cases

Hope this help

Rank: #481
Solution

Hi Junior,

Please refer below OML for your solution to sort local list.

Hope it works, Thanks ;)

SortLocalList.oml