cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NeilDulling
New Member

Update single record in list

Dear All 

have run into an issue i cant see the cause of 

i have a list that has a date in it when the record is updated i use a flow to update a due date column.  The execution plan is a simple one but it now seems to update every row of the list and not just the row that was updated

 
 

- When exisitng item is modified 

- Compose - with a formula in the input as follows

addDays(FormatDatetime(triggerBody()?['DateCompleted'],'MM-dd-yyyy'),int(triggerBody()?['Period']),'yyyy-MM-dd')

- update item with the output (i have the ID in and teh date filed set for the output 

 

The problem is it now seems to be running thousands of time every time someone updates and is updating every row in the list and not just the row that was updated and i cant see why

 

How can i make it only update the row that was modified and not all rows in the list 

any suggestions would be appreciated

1 ACCEPTED SOLUTION

Accepted Solutions
v-alzhan-msft
Community Support
Community Support

Hi @NeilDulling ,

 

As @ScottShearer  said, you should provide the screenshot of the flow.

 

And do you mean the flow would update all the items in the list? If yes, please make sure that you the Get item action instead of Get items action in the flow.

 

I'm afraid that your issue is your flow would update the special item in a loop when an item is modified, since if you shouldn't add a "Update items" action in a flow with trigger when an item is modified, it would run into a loop. If this is your issue, you could add a Condition under the trigger to prevent the flow run to a loop.

Hope the solution below could help you:

https://melihubb.com/2019/04/20/the-infinite-loop-what-it-is-and-how-to-avoid-it/

 

 

 

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.

 

View solution in original post

4 REPLIES 4
ScottShearer
Super User
Super User

@NeilDulling 

Please post a screen shot of your Flow - that will be a big help to those trying to assist.

If your are using a When an item is created or modified trigger, it is likely that you have created an infinite loop.  The Flow updates the list item which starts the Flow again...  Here is a link to a blog post that I wrote that may help you solve this issue.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
v-alzhan-msft
Community Support
Community Support

Hi @NeilDulling ,

 

As @ScottShearer  said, you should provide the screenshot of the flow.

 

And do you mean the flow would update all the items in the list? If yes, please make sure that you the Get item action instead of Get items action in the flow.

 

I'm afraid that your issue is your flow would update the special item in a loop when an item is modified, since if you shouldn't add a "Update items" action in a flow with trigger when an item is modified, it would run into a loop. If this is your issue, you could add a Condition under the trigger to prevent the flow run to a loop.

Hope the solution below could help you:

https://melihubb.com/2019/04/20/the-infinite-loop-what-it-is-and-how-to-avoid-it/

 

 

 

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.

 

Ah now you say that it becomes obvious and this is probably the cause 

it's funny this has only happened on my live version my test it did not 

 

I am having difficulty posting an image of the flow for some reason I get no source options when in the image editor) i can't work out how to add an image to a post

 

OK still cant get the options for posting a screen shot 

 

but thanks to all the solution worked 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,740)