cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Run flow once only per modification of list item

Hi,

I have multiple flows set up in a sharepoint list library which are used to send custom mails based on fields on the form. They are triggered from 'when an item is created or modified'.

 

Basically I have 3 different flows set up based on conditions. One of which for exaple is 'LS approval status'. The flow is, if 'LS approval status' is equal to 'APPROVED' then send custom mail.

 

The issue is, whenever any item in the list is updated at all, this mail will be triggered as long as the form still has this field set to 'LS approval status'.

 

Is there a way you can make sure each flow for each item is only run *once*, and not triggered by every change?

 

I read somewhere about the condition of 'created' is not equal to 'modified'. But it doesn't really solve my issue.

 

any suggestions at all would be really appreciated!

 

thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Run flow once only per modification of list item

HI @charlievaughan,

 

So you could have a status field on the list item and within your flow create a switcvh on this status field. Then each branch within your switch becomes one of your current flows.

 

At the start of each branch I would set another field InProgress to True and at the end of the branch set this field to False.

 

Then before your switch add a condition and exit out of your flow when the InProgress  is set to true.

View solution in original post

4 REPLIES 4
Highlighted

Re: Run flow once only per modification of list item

Hi @charlievaughan,

 

I would merge your 3 flows into a single flow ( this is assuming that each of your flows has the same trigger of created or modified). Most likely each of your flows handles a stage of your overall process.

 

If this is all correct then have a look at creating a state mahcine workflow.

 

More details you can find here:

https://powerusers.microsoft.com/t5/Microsoft-Flow-Community-Blog/Develop-Flows-Like-a-Pro/ba-p/8989...

 

Highlighted
Regular Visitor

Re: Run flow once only per modification of list item

Hi @Pieter_Veenstra

 

thanks for your response.

 

I did have them all set out in a single flow originally, but it didn't seem to work.

 

I have my form layout based on only certain people going in and entering information in certain fields.

 

i.e. once a person goes in and fills in first part of the form, they click submit. This generates a mail to a distributiuon list to go into the form and add their name and approval to a different section of the same form. This then gerates an email based on the value of one of the 'approval' fields.

 

So essentially, when a user submits the form, the first email is generated fine but obviously as nobody yet has added a value to the 'approval' field, it picks up that condition as 'false' and does nothing.. essentially ending the workflow.

 

Do you have any suggestions on how I could have all 3 conditions in one flow?

 

thanks

Highlighted

Re: Run flow once only per modification of list item

HI @charlievaughan,

 

So you could have a status field on the list item and within your flow create a switcvh on this status field. Then each branch within your switch becomes one of your current flows.

 

At the start of each branch I would set another field InProgress to True and at the end of the branch set this field to False.

 

Then before your switch add a condition and exit out of your flow when the InProgress  is set to true.

View solution in original post

Highlighted
Regular Visitor

Re: Run flow once only per modification of list item

Thank you so much for your help @Pieter_Veenstra. Your suggestions and post regarding machine workflow worked a treat.

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,054)