I have an application in which I want users to be able to search from a list of entries (set up as a datbase entity) where each entry will have a date entity attribute. I want to drop down to populate in order or descending date order, so that the most recents dates appear first. how can i configure this?
I currently have a interaction/drop down search feature on the page and it is currently working properly to search but right now it displays the dropdown in order of the entries first created --> last
Hi, @Simran Sharma
In order to sort the list you can use list sort action after fetching data from database or else you can directly sort the data from aggregates in descending date order,
Two Options is there
1. You are fetching data from aggregate means you can use Outsystems default Aggregate sort function.
2. Your values in local list means you can use List sort widget.
I hope this will help you. If need any further assistance kindly reach me.
Regards,
Gokulprasanth M
Hello, @Simran Sharma
For sorting based on dropdown. Add filter to your aggregate on which you want to sort and Try to add sorting in aggregate, your records will be sort.
Best Reagrds
-- Priya Jhode
Hi @Simran Sharma ,
If you are using aggregate you can simply use default sort like this
And if you have a local list, you can use the ListSort function available in the Systems moduleProvide these properties for the ListSort function:
1. set the list you want to filter in 'List'
2. set the date attribute you want to sort by in 'By'
3. set 'Ascending' to false.
This will sort your list in descending date order
Hope this will help you!