One of my PowerApps is shared with a group of 10 people outside the organization. It works fine for the most part, but at times it fails to submit to the SQL DWH in Azure.
There is no PowerAutomate in between, just a simple submit that should send 2 to 3 values from a Radiobox.
As an error handling step, I have started sending the values in the RadioBoxes to a Sharepoint list to ensure that the Submit actually happens. For this i have added the follwing code in onSuccess:
Notify("Successfully saved"; NotificationType.Success);;
Patch(SuccessLog; Defaults(SuccessLog); {selectedValues: ePostBody; Title: "Log"});;
I dont use Patch while submitting. I use SubmitForm(Form_1) on the save button like so:
SubmitForm(Form_1);;
For those interested, the contents of the ePostBody is in the Save-button (before the SubmitForm() command), so that the values are sendt to Sharepoint List anyways:
Set(ePostBody;
", RadioButton1: "; Radio_1.Selected.Value;
", RadioButton2: "; Radio_2.Selected.Value;
", RadioButton3: "; Radio_3.Selected.Value;
", User: " ; User().FullName;
", DateTime: " ; Now()));;
As for the error when the submit doesnt happen, i guess the follwing code onFailure should suffice:
Notify("Not saved properly"; NotificationType.Error);;
Now, the question is: If onSuccess, the values are sendt to the Sharepoint-List, why arent they saved to the the DWH?
It only happens some times. About 70% of all submissions are saved in DWH, the rest are not.