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 / Try/catch on patch fun...
Power Apps
Unanswered

Try/catch on patch function

(0) ShareShare
ReportReport
Posted on by 43

Hello Team,

 

I would like to have some kind of error handling when my app writes to DB using patch function. How do we confirm in powerapps that patch function actually did what it supposted to do? I'm trying to do Patch inside Try/Catch so if any issues happens (like network connectivity issue etch) during the patch execution, I want to know.

 

please advise how I can implement this.

 

Thank you.

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @vshah804 

    Patch() does not directly return an error message but there is documentation regarding how to both validate your data before a patch and how to use the IsEmpty() function to check for errors.  Please review canvas-apps/functions/function-errors and see if this helps. 

  • v-yutliu-msft Profile Picture
    on at

    Hi @vshah804 ,

    Do you want to confirm whether the patch function perform well?

    The first way is to check whether it has error message.

    The second way, I suggest you insert a gallery.

    Set the gallery 's data source to your DB table.

    After performing patch function, check the gallery to see whether items change.

     

    Best regards,

    Community Support Team _ Phoebe Liu

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @vshah804 how are you progressing with this? Were the above replies helpful? 

     

    @Anonymous 

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard