Allow multiple sort criteria in ListSort action
2975
Views
17
Comments
On our RadarOn our Radar
Frontend (App Interfaces)

The SortRecordList extension allowed to have multiple sort criterias. The ListSort should have feature parity with that extension, at least.

Having this built-in on the platform would be useful for sorting third-party datasources. For example, imagine that a web service returns financial transactions, and has two distinct columns: Date and Time. We would need to sort on both columns to be able to present data in chronological order.

I don't know if it should be an option in the platform? There are a lot of ways possible in the 'sorting way'. So wouldn't it be better that this option be available trough an extension like <this>?

The system action has many advantages over the extension. The most important is, in my opinion, having the true change when you rename or remove a field that is being referenced by a sort. Also, you don't need to cast the record list to an object, which is a non-obvious step required by the extension.

Can understand that, but that also isn't the case with the RW table column sorting widget so would it be possible here?

Merged this idea with 'OrderBy Widget Requirment' (created on 15 Aug 2018 04:55:36 by JitendraYadav)

Hi Team,


Same way we can implement the OrderBy widgets.

We need to provide multiple columns selection in order by clause with the type of ordering asc or desc.

In List Sort Action: we have only one column selection.


Thanks,

Jitendra



This comment was:
- originally posted on idea 'OrderBy Widget Requirment' (created on 15 Aug 2018 by JitendraYadav)
- merged to idea 'Allow multiple sort criteria in ListSort action' on 19 Oct 2018 07:19:42 by Kilian Hekhuis

Hi Team..can u plz modify ListSort widgets to allow sorting on multiple columns.



This comment was:
- originally posted on idea 'OrderBy Widget Requirment' (created on 15 Aug 2018 by JitendraYadav)
- merged to idea 'Allow multiple sort criteria in ListSort action' on 19 Oct 2018 07:19:42 by Kilian Hekhuis

Hi OS Team:Any updates?



This comment was:
- originally posted on idea 'OrderBy Widget Requirment' (created on 15 Aug 2018 by JitendraYadav)
- merged to idea 'Allow multiple sort criteria in ListSort action' on 19 Oct 2018 07:19:42 by Kilian Hekhuis
Changed the category to
Builtin & User functions


This comment was:
- originally posted on idea 'OrderBy Widget Requirment' (created on 15 Aug 2018 by JitendraYadav)
- merged to idea 'Allow multiple sort criteria in ListSort action' on 19 Oct 2018 07:19:42 by Kilian Hekhuis
2019-01-28 14-43-40
Franco

Hello, This idea is marked as 'on our radar' but I found in OutSystems forums this Forum Post which is linking to this answer. Isn't this working properly? Just asking because is marked as a Solution. It can be misleading.

Franco,

That just links to a workaround (and one with a number of caveats). It would be nice if this was supported natively (hence this Idea).

Is there any updates on this?

SortRecordList Forge extension allows us to sort by a combination of attributes but, currently, when selecting the sort type this will be applied to all the attributes.

Just as an addon it would be great to select the sort type per attribute, ascending or descending, like we normally do in a query. 

E.g. "Date Desc, Time Desc, Name Asc"

I'd like to add something to this idea, using José Ventura's comment.

I propose extending on José's comment with a rebuilt visual ListSort that would help users sort by multiple attributes and assign "descending" or "ascending" to each one.

Here's a sketch that I drew in paint to show the behavior:


1st step: User fills in the "List" property with a Record List Variable. The platform will read the attributes of that RecordList and will allow the user to choose the sort criteria;

2nd step: The user chooses the 1st criteria of sorting by opening the attributes combobox, which the platform would of pre-filled with all available simple type attributes in the structure (you can't sort by binary data, record or record list type attributes, of course). After selecting the attribute, the "Ascending/Descending" combobox will be available, defaulting to "Ascending". At the same time, the platform will open up a "2nd criteria" row with the same attributes combobox, allowing the user to continue to sort if he so chooses, etc...;

3rd step: If the user has more than 1 criteria, the arrows on the left will appear to allow the user to change criteria order;

I think this would cover all use cases. And would have the benefit of the true engine / self heal in Service Studio being able to check errors in the sort criteria, if there's a change in the structure of the original RecordList.


Is there any update on this?

Hi Nguyen,

Unfortunately not. In the meantime, if you're on O11, you can use the SortRecordList Forge Asset.

In addition, if your use case allows it, you can use in the front end Outsystems Reavtive Data Grid, that have advanced functionality for such cases. There are some limitations tho, but in general is very usefull.

Thanks for your reply, i wrote extention instead. My action is batch,it only works in server side so i cant use JavaScript or Agg to sort by multi columns.