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!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion