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.
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/
Miguel Verdasca wrote:
that did not work.
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
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.
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