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 / Problem with Get Files...
Power Automate
Answered

Problem with Get Files When Ordering By

(0) ShareShare
ReportReport
Posted on by 12
 
Hi all - I am having a problem with the following step that is part of a very large flow:
 
 
The step is meant to filter through a folder of files, return only ones with a certain substring in the filename, and bring back only one file - we are ordering by "created" in descending order. Currently this step is throwing an error:
 
body":{"status":400,"message":"The attempted operation is prohibited because it exceeds the list view threshold
 
There are only 45 or 50 files in this folder, and even when I remove the files it still errors out. It was working up until now. Is it possible that it is trying to order the entire library? When we remove the "Order By" it works fine, but then I am not guaranteed to get the correct file. 
 
Thanks in advance for any insight you have!
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at
    Hi @jmr98
     
     
    Looking at some other sources - it seems like it occurs last number of items in list which causes longer time of execution- Resolution would be to add a column as index - may be the Created column.
     
     
    Try to add the Created column as index in sharepoint list and see whether it works for you !
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • Verified answer
    narayan225 Profile Picture
    2,547 Moderator on at
    You can leverage the list view to create a filter that works for you.
     
    To do this, create a view in SharePoint list and set the sort by to Created.
    You can then select the view in Limit Columns by View option in Power Automate action.
     
    This way, you don't have to worry about using Order By in the action.
     
    Hope this helps.
    Cheers!
  • jmr98 Profile Picture
    12 on at
    Thank you both! @narayan225 yours did the trick for me!

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 641

#2
Vish WR Profile Picture

Vish WR 640

#3
Haque Profile Picture

Haque 495

Last 30 days Overall leaderboard