Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

How to update sharepoint item without loop

(1) ShareShare
ReportReport
Posted on by 60
I have a flow that ends with a condition where I want to update an item if the condition is satisfied or create an item if not. Everything works except the update item.
 
When I test the flow, if there aren't any items in the list, it creates them just fine.
 
Then I test the flow a second time, with these items in the list. The result of the second test is that all the items that are in the list update with the current item (without the title, for some reason.)
 
I'm thinking the problem is that Update Item has to be in a loop if I choose the Sharepoint list Item ID, therefore it loops all the items in the list instead of using the current id from the list. What am I doing wrong?
 
If you need more information to analyse the flow, please ask. Thanks.
 
Here are screenshots of my flow.
 
 
  • Michael E. Gernaey Profile Picture
    43,399 Super User 2025 Season 1 on at
    How to update sharepoint item without loop
    Hi
     
    So many details missing. You do not explain why you are getting data from Excel, or if the Excel data has the SharePoint Id etc.
     
    If you want to use Get Item you have to know the ID of the item in SharePoint.
     
    As for the loops etc and why the Title is there, its because you are not grabbing the value at the right now.
     
    The thing is, if you use the Get Items, yes it returns an array of items, but if your filter only retries 1 it only loops (in your apply to each), 1 time.
     
    Please provide mot details in each step that you are doing, and where stuff comes from. You are going to get a Loop when you place the ID because you used the Get Items and without the error I cannot explain what is wrong.
     
    There is no reason why it would loop more than 1 time, as long as your Filter in the Get Items has clear details that make it unique, then you wont care about looping or not.
     
    However to access things without looping you would do
     
    outputs('My Get Files Action')?['body/value']?[0]?['My Data Field']
    where 0 is the Index of the data you want from the Array. If you had only one item then it would just be [0]
     
     
     
  • JDucharme Profile Picture
    60 on at
    How to update sharepoint item without loop
    I need the Get items for the compare action to work.
     
    Where would I put the Get item? It also gives me a loop when I choose the dynamic list ID, I guess as it should. But I need the current item ID for it to update the current item.
     
    This is the way I configured the condition:
    The SharePointArray gives a combination of Table name and Fiscal year from the sharepint list (tablename-fiscalyear) and the outputs come from the "Nom du tableau" and "Année Fiscale du Tableau" compose actions.
     
    So the only the Condition only points to the array for the SharePoint list. Would that be a problem?
  • David_MA Profile Picture
    11,517 Super User 2025 Season 1 on at
    How to update sharepoint item without loop
    The fourth action in your flow is Get items. If you only want to update 1 item, you need to use the Get item (singular) action. Then the update item action will not end up in a for each action. 

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492