I have a code in Power Apps that runs a set of actions, refer below code snippet.
//PART 1 - WRITE PV FORM
PRDWritePVForm.Run(
//SOME INPUT PARAMETERS HERE
);
//PART 2 - ASSIGN TO NONE
Patch(
//SOME PATCHING TO SHAREPOINT LIST HERE
);
UpdateContext({loadingText: "Sending Notifications"}); //UPDATE LOADING SCREEN VALUE
UpdateContext({loadValue: 3});
//PART 3 - NOTIFY SSC
IfError(
PRDNotifySSC.Run(
//SOME INPUT PARAMETERS HERE
),
Patch(
//SHAREPOINT LIST,
Defaults(//SHAREPOINT LIST),
{
Message: FirstError.Message,
Source: FirstError.Source
}
)
);
//PART 4 - NOTIFY REQUESTOR
PRDNotifyRequestor.Run(
//SOME INPUT PARAMETERS HERE
)
This code is run after the approval of a request.
The code running well on PART 1 - 4, most of the time. However, PART 3 randomly does not run (or the trigger fails) over time.
The function is to run a Power Automate flow. The flow will send an email, containing information of a request.
The function is also wrapped in an IfError() function, to track if the flow call failed.
For example, refer to screen snip below.
PRDWritePVForm > Run history
PRDNotifyRequestor > Run history
In this example, there are 4 approvals happening in a short time range: Request ID 2363, 2368, 2367, 2365.
All three flows are running for Request ID 2363, 2368, and 2367.
However, PRDNotifySSC does not run for Request ID 2365.
Additionally, the PRDNotifySSC call is wrapped with IfError() function. But there is no error recorded.
Any insight for this issue helps a lot.
Thanks in advance!