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

Start a flow when updating an item

I have a SharePoint list with a few columns. I have configured a flow which updates the same list item and sends an email when an item is modified in the list. List items are modified from a second flow too which runs when an item in another list is modified.

 

To avoid infinity loops, I have created a column called "FlowControl (Yes/No)" which is checked if the flow is run subsequently after an item is updated. So basically, when I update the item, I set the column value to No and the flow gets terminated. However, my problem is if a user updates the item values from sharepoint list, they have to manually set the flowcontrol column value to Yes. If they don't, the flow is terminated.

 

Is there a way to handle this situation?

6 REPLIES 6
Highlighted
Community Support
Community Support

Re: Start a flow when updating an item

Hi @O365Guy ,

 

Do you mean that other users may not follow the rules you set? They need to set the flowcontrol column value to Yes when updating the item?

At present, I think the feasible method is to add an additional Condition to judge Modified By.

 

Analysis shows that the connection configured by Update item action uses your account. In other words, the factor that causes Flow to loop is that you trigger Flow again using Update item action.

So you need to check if Modified By is you, and if so, check the value of the flowcontrol column value to determine which action to take next.

 

If Modified by is another user, it don't need to check the flowcontrol column value.

 

Does it make sense?

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Start a flow when updating an item

Thenka @v-bacao-msft for your reply. Let me try and rephrase my question and make it simpler to understand.

 

I have a list with a couple of fields. There is a flow which updates the item when any item is created / modified in the list. Now, when a new item is created, the default value for the FlowControl field will be Yes. When the flow will run the first time, it will update the column value of the item and set the FlowControl value to No. Now when the second consecutive time the flow runs, it will check for FlowControl and will terminate. 

 

Now when another user edits the item, FlowControl will be No and so the Flow will terminate without updating the filed. My question was that is there a way to automatically set the FlowControl to Yes from UI?

 

You can ignore the list item getting updated from second list.

Highlighted
Community Support
Community Support

Re: Start a flow when updating an item

Hi @O365Guy ,

 

What do you mean from UI?

 

Is it automatically changed in the SharePoint field value or in the Flow interface.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Start a flow when updating an item

Hi @v-bacao-msft ,

 

By UI I mean the SharePoint list form. When the item is updated from Flow, I can set the FieldControl value but from SharePoint form, the user has to manually change the value to trigger the Flow.

Highlighted
Community Support
Community Support

Re: Start a flow when updating an item

Hi @O365Guy ,

 

What do you mean when the user clicks edit, does the value of this field change automatically?

It's obviously impossible to achieve this through Flow. I'm not sure if SharePoint list form has similar functionality. What I can think of is that PowerApps seems to be able to do this.

The field value is automatically changed when click Edit item, but I am not particularly good at PowerApps and cannot provide a suitable workaround.

Please try to ask similar questions in PowerApps community, maybe there is a good method.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Start a flow when updating an item

Hi @v-bacao-msft ,

 

Thanks for your reply. Yes, I can do it with PowerApps but was avoiding using PowerApps only for changing the value of FlowControl field. I'll have to look at other options to avoid infinite looping when an item is updated.

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 (7,514)