web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Three sorting problems...
Power Automate
Answered

Three sorting problems and one bad action :"Retrieve email messages from Outlook"

(0) ShareShare
ReportReport
Posted on by 127

I have a flow where from each unread email I want to extract a number and a date, that I will use later as variables.

I don't know if it's just my problem, but the "Retrieve email messages from Outlook" action, brings incoming emails in a random order.

I tried to extract the number and the date into a "data table", but ... surprise, you can't sort data in a data table. I can sort a list but I have two values, a ​​number and a date which represent two separate variables.

In conclusion the problem can be solved by having an answer to one of this three problems:

- How can I sort the emails brought by the "Retrieve email messages from Outlook" action, or

- How can i sort values in a data table, or

- Can i sort a list with number and date values and use later as two separate variables?

I have the same question (0)
  • Verified answer
    VJR Profile Picture
    7,635 on at

    Hi @ViliBit 

     

    Currently there is no action for sorting a Datatable or the "Retrieve email messages" and that will only need submitting a feature request if it is not present in the list or upvote it if present.

     

    For sorting a datatable all I can think of now is to write this table to an Excel and then use Excel as a datatabase, write an SQL query with the sort function. I know thats not straightforward but can't help.

    https://powerusers.microsoft.com/t5/Power-Automate-Desktop/PAD-Sorting-Datatable/m-p/1312902/highlight/true#M7644

     

     

     

  • ViliBit Profile Picture
    127 on at

    Thanks @VJR for your response. I didn't even think that such an action does not read the emails in order. The same with datatable. You gather some data and you can't do anything with it. Sorting should be pretty trivial.

    I wanted to avoid creating an excel file. It seems I have no choice, for now.

  • ViliBit Profile Picture
    127 on at

    About "Retrieve email messages from Outlook" action, I made a request at 

    https://ideas.powerautomate.com/d365community/idea/b72c1fa1-b038-ed11-a81b-000d3ae2981f 

    Please upvote that.

    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard