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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard