Power Apps Error Handling in PowerFX with Patch function
Here is the code.
// Create a new Loan
If(
IsError(
Patch(
'Loans',
Defaults('Loans'),
{
CustomerNumber: "CUST1000",
LoanDate: Date(2023, 5, 10)
Term: 240,
Amount: 20000
}
)
),
// On error
Notify(
"Error: the Loan could not be applied",
NotificationType.Error
),
// On success
Navigate('Success Screen');Notify("Success")
)
Hope this helps.