122
Views
2
Comments
Solved
List sort method does nothing
Question
Application Type
Reactive
Service Studio Version
11.54.61 (Build 63317)

I have a list "GetAggAuditList" with a data type of a structure list.

I have a data action that returns a list of around 1,300 records.  It's unsorted. I map that output to the GetAggAuditlist list. I then use a list filter method depending on what subset of data they are needing. For my test case, the list is narrowed down to 45 records. The list has 33 columns.

When I try to sort the list using a list sort method, nothing happens. It's as if the method had no effect whatsoever.

I've verified the list has records and the tablesort variable is set. In my test case, it's PolicyHolder.

I check the list in the debugger before and after the list sort. Nothing changes.

Is there something wrong with my list that it won't or can't be sorted?

Unfortunately due to data privacy issues, I can't post an OML.

2022-12-30 09-46-57
Deepika Patel
Solution

Hi @Jeff Kest,

Can you verify the value of  Tablesort Variable that you assigned to Listsort, it should be the name of the column that you want to sort. If it doesn't work, you can try assigning the value directly. 

You can refer the below links:

https://www.outsystems.com/forums/discussion/66412/how-can-i-proper-sort-a-list-on-an-reactive-app/

https://www.outsystems.com/forums/discussion/67269/sorting-list-variable-doesnt-updates-on-table-in-reactive/

Hope this helps!

Thanks,

UserImage.jpg
Jeff Kest

Thanks @Deepika Patel.  The first article led me to the solution. It's ugly, but it works.  

I had to create a list sort action for each of my 33 fields.  I tried first to split them into text, date, number and boolean fields, but that didn't work. So this is what I ended up with:

Of course I didn't need 4 different switches, but this is much more readable.

Thanks again!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.