In the code below, the single line with a call to a flow didn't work. The code before it did and the code after it exectued. How do I know? Because in the SQL database, the first set of code made the necessary changes, the code after mode the necessary changes, but the FLow execution history on flow.microsoft.com showed no execution. When I removed all comments, everythin worked. Go figure. Yet another frustrating half a day lost to PowerApps quirks. And no, I don't have time to have Microsoft log into my computer to verify it.
If(
First(G_ExceptionTable).Status = "Rejected",
UpdateIf(
'[dbo].[GASPExceptionApproval]',
FK_Exception = gblExceptionId And Rejected,
{Resolved: true}
)
);
// Run flow for updatinf exception
'GASPSQLProc-UpdateExceptionStatus'.Run(gblExceptionId,"In SDL",Now());
// Create associated exception trail record
Patch(
'[dbo].[GASPExceptionTrail]',
Defaults('[dbo].[GASPExceptionTrail]'),
{
FK_Exception: gblExceptionId,
ChangeDate: Now(),
Message: "Exception " & If(First(G_ExceptionTable).Status="Open","submitted", "re-submitted") & " (Status: 'In SDL') on " & Now()
}
);