In my app there is an Edit form which writes to a sharepoint list. There is a flow that handles a number of notifications off the back of a submission, so generally this is triggered in the OnSuccess property and works just fine. I also want the same flow to trigger in the OnFailure properly passing the form.error object as a context variable to the flow.
So, much like in the OnSuccess property I have this code in the OnFailure:
NameofmyFlow.Run("ERROR",detailsEditForm.LastSubmit.ID,User().FullName,User().Email,detailsEditForm.Error);UpdateContext({showPopup:false}); Notify("There was an error submitting the form. A helpdesk ticket has been raised", NotificationType.Error)
When the form errors I see the Notify message and the 'showPopup' variable is changed to close my dialog box but there is no evidence of the flow being triggered in Power Automate. Nor any errors being returned to indicate why. The exact same (except the first context string isn't "ERROR") Flow.run works in OnSuccess