Hey All,
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!