Skip to main content

Notifications

Power Automate - Building Flows
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!
  • jmr98 Profile Picture
    jmr98 12 on at
    Problem with Get Files When Ordering By
    Thank you both! @narayan225 yours did the trick for me!
  • Verified answer
    narayan225 Profile Picture
    narayan225 2,390 on at
    Problem with Get Files When Ordering By
    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!
  • Suggested answer
    Nived_Nambiar Profile Picture
    Nived_Nambiar 17,039 on at
    Problem with Get Files When Ordering By
    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!

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard