Suggestion: Sort Function for List Datatype
Hey everyone, I would suggest a build-in sort function for the AL List datatype.
Scenario:
I collect dates from different records (of different tables) in a List of [Date] variable. After that I want to iterate over those dates chronologically.
Basic Example:
local procedure ListExample()
var
listofDates: List of [Date];
begin
listofDates.Add(20190501D);
listofDates.Add(20190101D);
listofDates.Add(20190301D);
listofDates.Sort();
end;
The sort function could have an optional ascending : Boolean parameter to control the sorting.
For now I can create one on my own but on long term I would prefer a build-in standardized and optimized function.
Thanks a lot
HI @marcosabotinski thank you for reporting the suggestion, it make sense. I mark it as enhancement and we'll consider to include it in future updates.
Is this issue still being tracked? Would be really helpful otherwise you'd be stuck to the creation of temp tables and sorting the inserted values via Ascending(true/false) or implement a sorting algorithm i.e. QuickSort or BubbleSort...
Best regards