cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Abbie8290
Level: Powered On

When an existing item is modified trigger starts before item is modified.

Hey guys, I have a two flows running. One that triggers when an item is created and one where triggers when an item is modified. The one that should trigger when the item is modified, begins as soon as the item is created which causes the flow to fail as it is based on conditions that will only be true once the item is modified. I turned off the other flow (when an item is created) since both flows pull from the same list, but its still triggering when an item is added and not when I modify it.

 

Is there anyone else experiencing this issue, or is there something I'm not understanding about this trigger? My assumption was the trigger should only start once the item is added to a list, then selected and edited.

 

Any help or thoughts would be greatly appreciated. I've been stuck on this one for a few days now.

 

Abbie

1 ACCEPTED SOLUTION

Accepted Solutions
Mike2500
Level 8

Re: When an existing item is modified trigger starts before item is modified.

I agree it's a bit tricky to get set up.

 

Starting from a new flow with a trigger of "when a new item is created", add a "do until". (when you click "new step", it's under "more", as it's neither an action nor a condition)

 

The "do until" needs a condition to be set up, but lets leave that alone for now. Inside the "do until" add a "get item". The site address and list name will be the same as your original list used in the "when an item is created". For the Id, use the ID field from the "when an item is created" trigger.

 

Right, so after the item is created, we immediately request it again. This is functional, not efficient.

 

Then, add a "delay" action. (or, officially, a "schedule - delay"). For testing purposes, you can set it for a few seconds, but if you deploy it that way, I'm not sure what that would do to your billing.

 

Then, go back to the condition for the do until. When you click into the "choose a value" box, you should get a list of available fields, and that list should include all the fields retrieved from the "get item" action. 

 

 

flow do until.png

4 REPLIES 4
Mike2500
Level 8

Re: When an existing item is modified trigger starts before item is modified.

You're right, this behavior is inconsistent with how SPD workflows functioned. a workaround is to put in a loop that checks for the value of a particular field, and then pauses for a period of time. This is admittedly a poor workaround, but it's the only one I've found so far. 

Abbie8290
Level: Powered On

Re: When an existing item is modified trigger starts before item is modified.

Thanks for the reply, @Mike2500

 

Hmm, I see. If you don't mind could you five me an example of this workaround? I'm a begginer when it comes to flows and I'm still figuring stuff out. When you say a loop, is that an action available for the workflow? Could you screenshot what you mean, if you don't mind so I can visually have an example?

 

Thanks.

 

Abbie

Mike2500
Level 8

Re: When an existing item is modified trigger starts before item is modified.

I agree it's a bit tricky to get set up.

 

Starting from a new flow with a trigger of "when a new item is created", add a "do until". (when you click "new step", it's under "more", as it's neither an action nor a condition)

 

The "do until" needs a condition to be set up, but lets leave that alone for now. Inside the "do until" add a "get item". The site address and list name will be the same as your original list used in the "when an item is created". For the Id, use the ID field from the "when an item is created" trigger.

 

Right, so after the item is created, we immediately request it again. This is functional, not efficient.

 

Then, add a "delay" action. (or, officially, a "schedule - delay"). For testing purposes, you can set it for a few seconds, but if you deploy it that way, I'm not sure what that would do to your billing.

 

Then, go back to the condition for the do until. When you click into the "choose a value" box, you should get a list of available fields, and that list should include all the fields retrieved from the "get item" action. 

 

 

flow do until.png

Abbie8290
Level: Powered On

Re: When an existing item is modified trigger starts before item is modified.

@Mike2500

 

Thank you! I tried this flow and so far it is working for what I need it to do!

 

Abbie

Helpful resources

Announcements
firstImage

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 45 members 4,040 guests
Please welcome our newest community members: