Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Get Items in Do Until Loop

(0) ShareShare
ReportReport
Posted on by

I'm creating a flow to continuously compare a variable to values in a constantly changing Sharepoint list to search for a match. The Do Until loop should stop when a match is found.

 

I thought the best way would be to put a "Get Items" action in a "Do Until" loop and have the conditions of the "Do Until" loop say when <variable> is equal to <column name from the Get Items action> but it won't let me add the dynamic value from the Get Items action to the condition of the Do Until. Any suggestions? See screenshot below

cap.PNG

  • Community Power Platform Member Profile Picture
    on at
    Re: Get Items in Do Until Loop

    Thanks @v-alzhan-msft  this worked great!

  • Verified answer
    v-alzhan-msft Profile Picture
    on at
    Re: Get Items in Do Until Loop

    Hi @Anonymous ,

     

    Please take a try to refer to screenshot below to create the flow:

    1.png

     

    Best Regards,

    Alice

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    on at
    Re: Get Items in Do Until Loop

    @ScottShearer 

    I am still having my original issue where flow will not let me reference the list in the conditional statement of the Do Until action if the "Get List" action is within the Do Until action. Is there a better way to do this?

  • ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Get Items in Do Until Loop

    @Anonymous 

    Yes you can within the 5000 iteration and 30 day limit.

  • Community Power Platform Member Profile Picture
    on at
    Re: Get Items in Do Until Loop

    @ScottShearer Thanks for your response.

     

    I can't really use a scheduled flow because the variable I'm comparing it to is being created when an automated flow is triggered (an email is received). As long as I can change the limits and add wait actions to the Do Until loop, shouldn't I be able to have it refresh the list and re-compare each time?

  • ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Get Items in Do Until Loop

    @Anonymous 

    Without addressing your specific issue, there are a few points that I'd like you to know:

    • A flow will run for a maximum of 30 days - after 30 days a running Flow will be cancelled
    • A Do until loop will loop a maximum of 5000 times unless you have a premium license
    • The default is for a Do until loop to timeout after 1 hour and/or 60 loops.  To change the default, click on "Change limits" in the action
    • The values retrieved via get items or get item are static and will not change.  You need to retrieve the values again for updated info (get item or get items).

    Documentation on Flow limits can be found here

    You say that you want the Flow to run continuously - that might not be the best way to proceed.

    As an alternative, you might create a Flow with a Schedule trigger that fires every few minutes.  At which time you can fetrive your items and perform your tests, updates, etc..

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow