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 / Workflow - Caught in a...
Power Automate
Answered

Workflow - Caught in a Loop

(0) ShareShare
ReportReport
Posted on by 2

I got caught in a loop in a workflow and I am trying so hard to get out of it! 

I have 2 different lists. My first list collects the data, and at the end has a decision tree. based off of your selection, it will optionally: 

 

Show the item as completed

OR

Create a new item on a different list for further analysis.  

 

My issue comes with Modifications to List 1 after it has been routed to list 2. 

 

I am trying to get it to First check to see if it has already created an item in list 2, and if so, update it. If it has not already created an item in list 2 - create that item. 

 

Every single modification is creating a new item - it always functions over to create an item rather than first checking to see if it has done so already and updating that item instead. 

 

So, I have now built in a loop of my own. 

 

Once you have created the item in list 2 - update list 1 with a "yes" to indicate you have done so already. 

 

So my workflow now checks:

 

Do I have a yes in that column - if so, I update the item. if it does not have a yes in that column, create an item. 

 

NOT WORKING. I have tried Is not equal to, is equal to, contains.. everything i can think of - moving these back and forth. 

jellybelly74_0-1635453278939.png

 

any ideas would be helpful. 

Categories:
  • abm abm Profile Picture
    33,004 Most Valuable Professional on at

    Hi @jellybelly74 

     

    What's the field type of Workflow field?

     

    Thanks

  • jellybelly74 Profile Picture
    2 on at

    Hi, I am googling to see how to answer you. 

     

    Sorry. I am a Newbie 😞 

     

    My SharePoint Mentor is on vacay at the worst possible time. LOL

     

    I tried to add another layer or a secondary check last night to see if it would work and it did not. 

    jellybelly74_0-1635517372245.png

  • Verified answer
    v-LilyW-msft Profile Picture
    Microsoft Employee on at

    Hi @jellybelly74 

    Do you want to check the item whether this item exists in list2, if it does not exist, create one, if it exists, just update it?

    I set up a flow, you can refer to the screenshots below.

    Here are my two test lists. And 'ProjectNumber' is unique.

    vLilyWmsft_1-1635748772782.png

    vLilyWmsft_2-1635748787567.png

    Flow in details:

    vLilyWmsft_0-1635748694682.png

    vLilyWmsft_3-1635748922018.png

    Expression:

    length(outputs('Get_items')?['body/value'])

    vLilyWmsft_4-1635749028528.png

    If yes, it means that there is no such item in list2, and need to create, otherwise, it means that the item exists in, just update it.

    vLilyWmsft_5-1635749429784.png

    Save and test.

    When the item is updated,the item in list2 will be updated.

    vLilyWmsft_6-1635749693425.pngvLilyWmsft_7-1635749721433.png

    When the item is updated, a new item will be created in list2.

    vLilyWmsft_8-1635749795428.pngvLilyWmsft_9-1635749895237.png

    Hope the content above may help you.

    Best Regards

    If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard