How can I sort a list of items by Date/Time value?
While designing a Flow, I want to show a list of items sorted by a Date/Time. Any suggestions on how to go about this?
Comments
-
Hi there,
There are a couple ways we can do this. One solution could be utilizing a Rule Collection Sort step to sort a list of items by a Date/Time value. Once adding the step to a Flow, you can configure the step to sort a collection of items by Date/Time.
Within the Rule Collection Sort step properties, set the Input Collection as the list you want sorted by Date/Time. This example uses a list containing only Date Time types.
If we wanted to sort the list contents from the most recent Date/Time to the oldest, the following Rule can be used:
Sorted output results:
Another solution would be utilizing a Fetch Entities step which has a property allowing the Date/Time results to be ordered in a specific manner.
This fetch would return the field “__date” associated Date/Times in ascending order.
Hope this helps!
Howdy, Stranger!
Categories
- 2.1K All Categories
- 17 General
- 154 Installation / Setup
- 980 Flows
- 86 Rules
- 198 Administration
- 203 Portal
- 426 General Q & A
- 592 Forms
- 280 Reports
- 3 Designer Extensions
- 38 Example Flows
- 32 CSS Examples
- 1 Diagram Tile
- 5 Javascript Controls
- 137 Pages
- 1 Process Mining
- New Features
- 144 Datastructures
- 49 Repository
- 163 Integrations
- 25 Multi-Tenant
- 21 SDK
- 39 Modules
- 36 Settings
- 18 Active Directory
- 12 Version 7
- 34 Version 8