Dynamic By of ListSort
228
Views
6
Comments
New
Builtin & User functions

At this moment, the "By" of listSort is not dynamic, which means it will not allow a variable that does not have the same name as one of the columns in the list. This will result in having something like:

1st option

or

2nd option


It would be interesting to have something like this:

Since the "SortBy" would already bring the name of the column, it would be something straightforward.

Hi @Yuri Fontes ,
I already created a ticket for OutSystems, because in my opinion this is a bug.
https://www.outsystems.com/support/portal/case?TicketITSMId=2583519

OutSystems has created 2 problems for this #RPM2100 and RPM2107.
Unfortunately the investigation is on hold, because there not enough users having a problem with this, and using the switch is a workaround.
Myself I've create a JavaScript which solves the issue on our side....
If you need it, let me know. Maybe it can help you to.

Best regards,

Jeroen Vormer

Hi @Jeroen Vormer 

You cannot share support case urls, they are not public, instead they are tied to accounts of a specific activation code.

You can open it, we cannot.

Regards,

Daniel

@Jeroen Vormer 

I would like to know your your solution

@Daniel Kuhlmann ,

yes I know, but I want just to let you all know..

Been facing this issue as well. Tracing the code through JS, it seems that passing the column directly to the ListSort will end up referencing the list's record value, while if we pass a text directly, even if it has the same name as the entity's attribute, it will use the text itself as the value for comparison:


Passing the attribute directly:

Passing the attribute's name:


This forces us to do a gigantic switch for sorting. Maybe an easy fix would be to have the OnSort event also have a generic output parameter that we could pass directly to the ListSort, alongside with the column's name we already have.

I've already created the solution to change the SystemActions (and further) for OutSystems to have a look at, improve and use.

Unfortunately this RPM's will not be picked up as long the amount of customers, which see this as an issue, is to low.