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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Error handling patch f...
Power Apps
Unanswered

Error handling patch function

(0) ShareShare
ReportReport
Posted on by

Hello together,

 

I have a question concerning error handling in PowerApps.

In my app I have some buttons, that do patches into different sharepoint lists with one click. Now I got the information from the app users, that sometimes a network error while using patch function occures. I still wasn t able to identify the reason for the error.

My fear is, that an error with just one of the for example three patches in an onselect generates invalid data, because two patches work fine and the other one fails. Result would be, that you need to correct the third list or the other two sharepoint lists manually that they are on the same data level again.

Does anybody have some idea whats the best way to deal with this problem? My idea was to implement kind of restruction, that if one patch generates an error the other patches won't run, too.
I think a problem is the order of the patches, because when for example the third patch creates an error, there is no more possibility to stop the patches before.

 

Thanks for your ideas,

 

Lukas

Categories:
I have the same question (0)
  • cdwhite Profile Picture
    1,067 Most Valuable Professional on at

    Hello,

    Have you currently implemented any error handling on your Patch statements? If not, I'd suggest doing that first. Matthew Devaney has an excellent blog about how to get going:

    Power Apps Patch Function Error Handling - Matthew Devaney

    You could then bake in the logic of only running Patch 2 if Patch 1 is successful, only running Patch 3 if Patch 2 is successful, etc

  • luwu_7100 Profile Picture
    on at

    Hey, thank you.

    Actually I haven't implemented any error handling, but I was thinking about something like you said.

    But my problem is, this will prohibit problems only when the error would be in the first patch. Because when Patch 1 is successfull and Patch 2 generates an error, then Patch 1 is already done and can't be stopped.

    But thanks for the link to the blog 🙂

  • cdwhite Profile Picture
    1,067 Most Valuable Professional on at

    My only other thought is whether you can use the Validate and/or DatasourceInfo functions to pre-check all 3 patches before they’re actioned.

     

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-validate


    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-datasourceinfo

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard