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 Apps / Ordering Files in Shar...
Power Apps
Answered

Ordering Files in Sharepoint by date modified/created

(1) ShareShare
ReportReport
Posted on by 6
Hi,
 
For the life of me I cannot get automate to list files in a folder by date modified. I'm trying to get the newest file in a specific folder. here's what I have: It runs perfectly when I just use the get files (properties only) but not when I add in the OrderBy Modified. I've checked that that is the right thing to reference and it is, I've also tried using ChatGPT, but it runs me round in circles. Is there something really obvious I should be doing? For some reason, it also adds in an Apply to Each loop by itself. Help Appreciated. 
 
Categories:
I have the same question (0)
  • Verified answer
    Solutionm8 Profile Picture
    92 on at
    Hi

    The reason that it inserts an apply to each is because you are selecting a dynamic value from a previous action that might return more than one item.
    Just remove it and insert a new Get files (properties only) action and follow the steps below.

    The value in the Order By field needs to be specified as an ODATA OrderBy query.
    So the column name in plain text and then followed by the sort direction - either asc or desc. So "Modified asc" or "Modified desc."
    See the picture below.



    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    Visit my YouTube channel: Solutionm8
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 860

#2
Valantis Profile Picture

Valantis 548

#3
Haque Profile Picture

Haque 417

Last 30 days Overall leaderboard