I have been building a Leave Request web part using the SPFx Framework and React.js. Users are allowed to apply for leave via a simple form on the web part and i've been using PnPjs to send the data across to a SharePoint List when they hit the submit button. An approval Flow is then kicked off when a new item is created in this list.
A suggested feature that I am trying to incorporate is the ability to edit and cancel requests. Since the approval flow is immediately triggered when a request is submitted, this brings up the question: Is cancelling a running Flow possible? Here are some scenarios that such features are useful:
1. When a user submits a requests, but wants to go back to the item to edit some information, can the already triggered Flow be cancelled then kick off again with the updated data?
2. When a user submits a request but wishes to cancel it completely and send in a new request, can the triggered Flow be cancelled?
Please note that I would like to put these operations in the hands of the user, so that they can be the one to edit/ cancel requests. Therefore I was wondering if I can create "Edit" and "Cancel" buttons on each list item itself to give them these abilities. I came across this article that I've tried and seen it work: https://wonderlaura.com/2018/07/18/button-in-sharepoint-list-to-trigger-microsoft-flow/. But, my issue is NOT with triggering a Flow via a button on a SharePoint List, it is with configuring a Flow that can cancel another running Flow (or something of the sort).
I would just like some advice on if this is possible or if there are any other solutions to cater for this need. Any suggestions/ ideas are welcomed!
Thank you very much!
In short no, currently not a way to cancel a running flow from another flow. You could potentially add a button that executes a flow that advises the flow owner which flow to cancel.
Hey @Gristy ,
Thank you for your response. Yes, I can use a button to trigger a Flow to advise the manager to cancel, however, I am the Flow owner lol. The thing is, I am responsible for building out and setting up everything for the processes of this leave application to work, so that all the supervisor and hr manager has to do is click approve or decline within an email that the Flow sends to their inbox. They do not use the Flow website/ interface AT ALL to do anything, nor do they want to because they want the convenience.
So my point is, if I were to implement that cancel button, it will just send another email to the supervisor and/or hr manager's inbox (that would most likely get lost/ unread in the bunch of emails they already have to read), advising them that there is a request to cancel, and they will come to me to tell me to go cancel it...😅 This is why I would have liked that feature of cancelling the Flow completely via the click of a button... But there are only so much of us that understands that such a feature takes time to implement.
Either way, thank you for your suggestion! And thank you for letting me know that this feature is not currently available.
I am still open to any other suggestions as I try to come up with my own 🙂
Check out how to claim yours today!
Check out new user group experience and if you are a leader please create your group
Test your skills now with the Cloud Skill Challenge.