Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Power Apps Tips, Tricks, and Best Practices

You're reading from   Power Apps Tips, Tricks, and Best Practices A step-by-step practical guide to developing robust Power Apps solutions

Arrow left icon
Product type Paperback
Published in Nov 2024
Publisher Packt
ISBN-13 9781835080078
Length 430 pages
Edition 1st Edition
Arrow right icon
Authors (2):
Arrow left icon
Tim Weinzapfel Tim Weinzapfel
Author Profile Icon Tim Weinzapfel
Tim Weinzapfel
Andrea Pinillos Andrea Pinillos
Author Profile Icon Andrea Pinillos
Andrea Pinillos
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Preface 1. Part 1: Overall Project Planning
2. Chapter 1: Understanding Requirements and Project Planning FREE CHAPTER 3. Chapter 2: Working with Solutions 4. Chapter 3: Power Platform Environments 5. Chapter 4: Choosing the Right Tool – Navigating Canvas Apps, Power Pages, and Model-Driven Apps 6. Chapter 5: Data Connections 7. Part 2: Advanced Power App Techniques
8. Chapter 6: Variables, Collections, and Data Filtering 9. Chapter 7: Canvas App Formulas 10. Chapter 8: Conditional Formatting and URL Deep Linking 11. Part 3: Power Platform and Other Integrations
12. Chapter 9: Integration with Power Automate/Teams/Outlook 13. Chapter 10: Integration with Power BI 14. Chapter 11: Integrating Power Apps with SharePoint 15. Chapter 12: Integration with Power Virtual Agents/Copilot 16. Part 4: Governance, Security, and Deployment
17. Chapter 13: Governance, Security, and Application Life Cycle Management 18. Chapter 14: Error Handling 19. Chapter 15: Registering a Power App in Azure 20. Index 21. Other Books You May Enjoy

Using the OnError property

Another useful approach in handling errors is using the OnError property for the app itself. This property can be found as shown in Figure 14.12.

Figure 14.12 – Accessing the OnError app property

Figure 14.12 – Accessing the OnError app property

The OnError property is used to define how the app should respond to unexpected errors that come about during the execution of the app. This property is designed to handle errors that are not addressed by other error-handling methods, such as the built-in error functions that we reviewed previously (IfError(), IsError(), etc.). These types of errors are referred to as unhandled errors as they have not been handled by the error handling functions.

Examples of use cases for OnError

When an unhandled error occurs in a Power App, the OnError property is triggered. This allows developers to define a specific action or response when such errors arise. The typical use cases include the following:

  • Logging errors: Developers...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime