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

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
Super User
Super User

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





If anybody solved your question, remember to mark its post as a solution!

Proud to be a Flownaut!





View solution in original post

4 REPLIES 4
Super User
Super User

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





If anybody solved your question, remember to mark its post as a solution!

Proud to be a Flownaut!





View solution in original post

LucLabelle
Level: Powered On

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,
Super User
Super User

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.





If anybody solved your question, remember to mark its post as a solution!

Proud to be a Flownaut!





LucLabelle
Level: Powered On

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

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

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!

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: 93 members 3,356 guests
Please welcome our newest community members: