cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Is there a workaround possible in the case

Hi everyone,

 

I'm looking for a workaround. I made four flows for a SharePoint list.

I only want to trigger the flow when the column is modified. The problem is that every flow runs after the first time when a column is modified. The flow start perfect when it start. The second flow is also right but the after that multiple flows run. I know there is a uservoice for this problem but is there already a workaround?

Flow with a switch.pngTriggers flow.png

So i want to run only one flow when this column is modified

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Is there a workaround possible in the case

Here is an example.

 

I used a custom list with 3 columns:

Title Column

A text column

A Yes/No column that defaults to no.

 

The first thing I do is to compare the created and modified dates.  If they are the same, then I exit via the control - terminate action.  I do this because if the dates/times are the same it means that this is a new item and not an existing item being modified.

 

The next thing I do is to evaluate the value of the Flag.  If it is No (false) then I update the list item.  One of the updates that I make is to set the Flag to yes.

 

If the flag is Yes, then the Flow will exit via a control-terminate action because this Flow has already run.

 

Please post if you have additional questions.

 

If this meets your needs, please mark your question as solved.

 

The Flow in the screen shots below ran successfully for me.

 

Flag1.jpgFlag2.jpgFlag3.jpg

 

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

Scott
16 REPLIES 16
Super User
Super User

Re: Is there a workaround possible in the case

I am not aware of any way to stop this behavior.  One work around might be to add a column (probably a yes/no column) to act as a flag.  The first time the Flow runs, set the flag to "Yes".  Have a condition at the top of your Flow that checks the flag value - if the value is "Yes", then stop the Flow by using the terminate action.

 

Please post here if you would like an example.

 

If this solves your issue, please indicate that this issue is solved.

 

Scott

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

Scott
Anonymous
Not applicable

Re: Is there a workaround possible in the case

Hi Scott,

 

Thanks in advance for your quick answer.

I would love to have a example of your solution. 

Super User
Super User

Re: Is there a workaround possible in the case

Here is an example.

 

I used a custom list with 3 columns:

Title Column

A text column

A Yes/No column that defaults to no.

 

The first thing I do is to compare the created and modified dates.  If they are the same, then I exit via the control - terminate action.  I do this because if the dates/times are the same it means that this is a new item and not an existing item being modified.

 

The next thing I do is to evaluate the value of the Flag.  If it is No (false) then I update the list item.  One of the updates that I make is to set the Flag to yes.

 

If the flag is Yes, then the Flow will exit via a control-terminate action because this Flow has already run.

 

Please post if you have additional questions.

 

If this meets your needs, please mark your question as solved.

 

The Flow in the screen shots below ran successfully for me.

 

Flag1.jpgFlag2.jpgFlag3.jpg

 

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

Scott
Anonymous
Not applicable

Re: Is there a workaround possible in the case

Hi ScottShearer,

 

Thank for the example. it looks perfect for a solution when you want to send one mail.

In my case i need to send two kind of mails

 

1 mail for the option = Completed

1 mail for the option = Not completed

 

Is there a way when can use your sample for the two options?

Now i'm gonna test your solution Smiley Happy

Anonymous
Not applicable

Re: Is there a workaround possible in the case

It looks like it didnt work. I made a flow for the column = action owner.

So only when this column is modified the flow should run.

I changed the column completion Hierarchical responsible so the flow dont need to run but i did.

Did i something wrong?

 

Look at the example

 

Example 1.pngExample 2.pngExample 3.png

 

Or do i need to add your two Conditions before my flow? I will test it!

Super User
Super User

Re: Is there a workaround possible in the case

Flow and SharePoint do not surrently support the ability to monitor a single coulmn for a change.  All you know is that one of the columns changed, but not which one.  I know hat this has already been submitted as a Flow idea - you maight want to vote for it.

 

You can go two different ways as a work around:

  • See the Blog posts on state machine Flows using a switch statement
    • This option can get a little complicated but it is a better technical solution
  • Store a copy of the data in a separate column and compare the two
    • If they are the same, then it hasn't been changed
    • If they are not the same, then that column has changed
      • Take action as appropriate
      • Update the copy to match the source column
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Anonymous
Not applicable

Re: Is there a workaround possible in the case

Hmmm i will look at the blog post. But your first solution works also well with the colums? 

Your flow triggers only when you modified the column?

 

I tried your solutiion but only get a error... look for the pics

 

Example 4.pngExample 5.png

Community Support Team
Community Support Team

Re: Is there a workaround possible in the case

Hi @Anonymous,

 

Do you want to trigger your flow when a specific column is modified?

Do you want other flows not to run when the first flow is fired?

Further, could you please show a bit more about the error message within your flow?

 

I agree with @ScottShearer's thought almost, you could consider take a try to customize a Yes/No type column (Default value is No) in your SharePoint list. Then add a "Update item" action within your flow, set the Yes/No type column to Yes. In addition, add a Condition under the trigger of your flow, check if the Yes/No type column is Yes, if yes, do nothing (or terminate this flow using the "Terminate" action).

 

Please check and see if the following workaround would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Flows/Send-an-Alert-only-when-a-specific-column-changes/m-p/106153/highlight/true#M10392

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Is there a workaround possible in the case

Hi Kris,

Do you want to trigger your flow when a specific column is modified. Yes! Now al the flows runs so the end user get all the mails when only one column was modified.

So i made just three flows for three different column. I want them to run when the column is modified.

I will look at your workaround. I will make a new small list in SharePoint to test the solution Smiley Happy

Anonymous
Not applicable

Re: Is there a workaround possible in the case

Here is some extra information because i think i do something wrong after the flag flow.

 

Here is the list:

Example 6 SharePoint list.png

 

Looks nothing special.  The key is, i want to make two flows.

1 = approved

2 - completed

 

I only want to run the flow when i modified the column.

 

Here is my flow, can you see what is wrong compare to your solution?

Example 8 Flow.png

Example 7 Flow.pngExample 9 Flow.png

And here is the error flow:

Example 10 Flow.png

Anonymous
Not applicable

Re: Is there a workaround possible in the case

@ScottShearer I made a mistake, the flag column was a choice column Smiley Sad

Now i changed it and i'm a little bit further in het proces.

 

 Example 11 Flow.png

 

Can you see what is wrong @ScottShearer 

Cant see why it's not working. I just build the same flow.

 

Just spoke the flow team in India and they don't know a workaround, strange. I think the solution of ScottShearer will work with some tuning. 

Anonymous
Not applicable

Re: Is there a workaround possible in the case

@v-xida-msft I think your link can be a nice workaround but how can i use that solution in my example.

I see that the topic starter had two colums with date you so can compare the date.

 

That is not possible with approved / not approved or completed / not completed.

Super User
Super User

Re: Is there a workaround possible in the case

@Anonymousin looking at your earlier example before you changed to a lookup from a choice, I believe the Flow may have been running properly.  The first time the Flow runs will be when an item is created - thats what the actions inside the scope address.  If the create and modified dates are the same, then exit.  You only want something to happen when an item is changed - not when it is created.

 

Take a look at the terminate action - you can set it to terminate with success rather than failure - this will eliminate your error I believe.

 

If you post some detailed screen shots of your current Flow, I will take a look.

 

 

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

Scott
Anonymous
Not applicable

Re: Is there a workaround possible in the case

You where right Smiley Happy

 

I changed the terminate  action to succes and al the flows are now green, success.

So the flow till the last terminate action included the update works fine but after that.

When i made the last condition for the mail, see the pics below.

Nothing happend, i tried a condition and a switch/case but the mail didnt send.

 

Example 12.pngExample 13.png

Anonymous
Not applicable

Re: Is there a workaround possible in the case

It works!! I tweak it a little bitt. Tomorrow is will show the awesome flow, thanks guys!
Anonymous
Not applicable

Re: Is there a workaround possible in the case

It works for now Smiley Happy I used the solution form @ScottShearer but changed the column Yes/no default to Yes. 

For the three flows i made 3 checkboxen for the flows. 

 

When a new item is added to the list all the boxs are not checked. 

So you have to edit the list, save and all the box are checked in. 

Now you can trigger the flow hand for hand.

 

It's not ideal but for fine for now. Hopefully MS can fix the usevoice so there is nog workaround. 

 

Here is het solution:

 

Example 14.png

So when you uncheck the box, the flow runs.

 

Here is the total flow:

 

Example 15.png

Not perfect but i think for now oke.....

Helpful resources

Announcements
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!

fourthImage

Australia Summit

Travel to Melbourne and network with thousands of peers!

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: 73 members 4,262 guests
Please welcome our newest community members: