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.

 

View solution in original post

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

Users online (1,173)