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

Is it possible to validate if a SharePoint list item has an instance of a Flow running ?

Hi, 

 

I was wondering if anyone knows how to or if it's possible to validate if a SharePoint list item has an existing Flow instance running? 

 

Here is my use case: 

 

I have a pricing approval Flow triggered by the sales rep. Once they fill up the request, they send it for approval. This Flow has many approval levels. Once the Flow is started, it can take a few days before it's approve by everyone. During that period, the rep my have to change some things in his request, so he starts a second approval process.

 

This is creating a second instance of the Flow on the same item and this is causing some confusion amongst the approvers.

 

I'm looking for a way to terminate the initial Flow automatically. Anyone knows if it's possible and how to do it?

 

Thanks for your help,

Luc

I hope this helps,
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Is it possible to validate if a SharePoint list item has an instance of a Flow running ?

Hi LucLabelle

 

I don't know any way to terminate an Approva from an independent Flow execution; I'm also interested to know if this feature exists for future developments.

 

In the meantime, I guess there is an easy workaround to verify if there is a flow running against an item, that is to add a new Yes/No column to the Sharepoint List; assign No by default, Yes once trigger is executed and No whenever Approval is finished. THere is also a Flow related run proprty (see https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language) that allows to identify the Flow that is currently running (not sure if it also identifies the Flow Execution ID, since I haven't explored it yet) 

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

4 REPLIES 4
Highlighted
Dual Super User III
Dual Super User III

Re: Is it possible to validate if a SharePoint list item has an instance of a Flow running ?

Hi LucLabelle

 

I don't know any way to terminate an Approva from an independent Flow execution; I'm also interested to know if this feature exists for future developments.

 

In the meantime, I guess there is an easy workaround to verify if there is a flow running against an item, that is to add a new Yes/No column to the Sharepoint List; assign No by default, Yes once trigger is executed and No whenever Approval is finished. THere is also a Flow related run proprty (see https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language) that allows to identify the Flow that is currently running (not sure if it also identifies the Flow Execution ID, since I haven't explored it yet) 

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Highlighted
Frequent Visitor

Re: Is it possible to validate if a SharePoint list item has an instance of a Flow running ?

It turns out to be a little more complex than that. I actually have to "reject" the approval at the stage where the Flow is at. So not just "cancel" the Flow. 

I hope this helps,
Highlighted
Dual Super User III
Dual Super User III

Re: Is it possible to validate if a SharePoint list item has an instance of a Flow running ?

In your multilevel Approval scenario, I guess yo need to Start a first level Approval, if accepted Start a second level Approval, and so and so right?

Then one possible option is to store the item last modification date & time before the first level Approval. Everytime the Approval reaches a new level, Flow should doublecheck if this value has changed; if not start the next level Approval.



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Frequent Visitor

Re: Is it possible to validate if a SharePoint list item has an instance of a Flow running ?

Hi, 

 

Thanks for your suggestion. I think I might be able to implement it as such. Basically, if I have an existing instance running, don't run again. 

 

This would force them to follow a little closer the approval statuses. With proper alerting and change management, this might work and might end up being better than automating it 😉  

 

Thank your very much!!!!

I hope this helps,

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (9,193)