web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Error Handling
Suggested answer

Missing enteries in DWH on Submit

(0) ShareShare
ReportReport
Posted on by 28
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.  
 
I have the same question (0)
  • aftabp Profile Picture
    28 on at
    Missing enteries in DWH on Submit
    @MB-15091433-0
    The solution you suggested is under consideration but since it only fail sometimes, its not practicle.
     
    What @Michael E. Gernaey suggested is something i can try. I just need to figure out how i do it. 
     
    In any case, i am looking to dig deeper into the server's event logs to see if i catch anyting there 
  • Suggested answer
    Michael E. Gernaey Profile Picture
    48,842 Super User 2025 Season 2 on at
    Missing enteries in DWH on Submit
     
    Since you are looking for this, you can use the OnError event of the Form, versus sending them to SharePoint.
     
    Unfortunately, unless you are willing to try to make it happen (which is weird as you said 30% of the time it fails that is a lot and would seem to be easy to capture).
     
    You have a few options
     
    1. Leverage Application Insights and it will capture the errors
     
    2. Leverage the Errors object in your OnError for the Form to get the error, however you have to make sure you have NO code after your submit or it will wipe any error information as you moved onto new code.
     
    3. Turn on formula-level error management (It should just be on by now) and capture it (per below)
    Since its not considered an unhandled error per se, but you can also in the in the OnError or the App, look at the FirstError or the 
     
    You are limited if you cannot reproduce it manually or cannot do these.
     

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey
  • Suggested answer
    MB-15091433-0 Profile Picture
    13 on at
    Missing enteries in DWH on Submit
    Hey, 
    might not be the solution maybe you could save the values to SharePoint and then use a Power Automate Flow that transfers the records from SharePoint to the DWH and if you want to go extra safe - you can then try to retrieve the just patched value from the DWH and escalate if that were to fail and if it is successful you can let the flow delete the record from SharePoint.
    If you have any questions feel free to ask :)
  • aftabp Profile Picture
    28 on at
    Missing enteries in DWH on Submit
    The issue is that it doesnt always happen. I have tried to recreate the issue multiple times but failed. 
    I have narrowed it down to that there is latancy issue between the PowerApp and SQL DWH.
    Is there a way to turn on the logging for a day?
  • Suggested answer
    Michael E. Gernaey Profile Picture
    48,842 Super User 2025 Season 2 on at
    Missing enteries in DWH on Submit
     
    To really understand what is going on, please do the following this will give you much better details.
     
    Please follow these steps to look into Live Monitor for possible errors

    1. Please go to PowerApps.com in the environment published
    2. Please click the Apps menu option on the left
    3. Find your App in the list and Click the ... at the end
    4. Click Details ==> Live Monitor
    5. Once it opens up, click Play Published App
    6. When that Tab Opens, Play your App, Cause the issue
    7. Go back to Live Monitor Tab
    8. On the right side, click the Properties (its vertical) to open the right side window
    9. In the Filter (Top Right) Type Error
    --See if you have any errors
    --if so, please scroll through them, real errors cause 4 lines (usually) of errors
    ----one of the 4 lines will populate the Properties window with 4 Tabs

    10. Grab the Response Tab
    11. Expand the Headers and Body Sections
    12. See if you can share or understand the error

    If this shows nothing please come back here.


    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 982 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 396 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 356

Last 30 days Overall leaderboard

Featured topics