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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Workflow - Caught in a...
Power Automate
Unanswered

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:
I have the same question (0)
  • abm abm Profile Picture
    32,856 Most Valuable Professional on at
    Re: Workflow - Caught in a Loop

    Hi @jellybelly74 

     

    What's the field type of Workflow field?

     

    Thanks

  • jellybelly74 Profile Picture
    2 on at
    Re: Workflow - Caught in a Loop

    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
    on at
    Re: Workflow - Caught in a Loop

    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

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 Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard