99
Views
5
Comments
aggregate with sorting showing incorrect data on runtime

In my entity I am having an attribute "Is_Priority_Usage" (Boolean), the is_priority_usage true should appear at top in list and after that remaining items should be sorted based on "name" attribute in ascending order.

I have two sorting:

1) Entiry.Is_priority_usage    =    Descending

2) Entiry.Name    =   Ascending 

At design time it is showing data in expected sequence but at run time it is showing all data in ascending order by "name" column.

2025-11-19 06-14-01
Miguel Verdasca
Champion

Hi,

did you try to put only the sort of column you want (the priority), to see if it looks good?

The order also matters, he will first sort the first sort, then within the first he will sort the second.

If after trying this, you continue with the same problem, if you can send that case in an OML or at least a screenshot of what you are doing in the aggregate.


Cheers


Extra Info: 

Document: https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Query_Data/Sort_Results_in_an_Aggregate 

Post: https://www.outsystems.com/forums/discussion/21343/multiple-attributes-sort-on-listsort/

UserImage.jpg
Nitin Soni

Miguel Verdasca wrote:

Hi,

did you try to put only the sort of column you want (the priority), to see if it looks good?

The order also matters, he will first sort the first sort, then within the first he will sort the second.

If after trying this, you continue with the same problem, if you can send that case in an OML or at least a screenshot of what you are doing in the aggregate.


Cheers


Extra Info: 

Document:  https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Query_Data/Sort_Results_in_an_Aggregate 

Post: https://www.outsystems.com/forums/discussion/21343/multiple-attributes-sort-on-listsort/

 

 that did not work.

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Nitin,

If the order should not be changeable at runtime, just make sure there is not logic available to alter the sort order.

Regards,

Daniel

UserImage.jpg
Nitin Soni

Thank you everyone, the issue was from my side. I have using Interaction/DropdownSearch element on screen to show the results and this dropdown is itself applying sorting.

Is that possible to change the defauld behaviour of this element.

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi Nitin,

you can use the advanced format to set the option shouldSort to False

something like this :

{shouldSort: false}

Then the choices library (what is inside the DropDownSearch as implementation) will show in order it is given to it.

Dorine

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