Bug - Internal error in the AND/OR function Canceled Canceled

A recent update to Power Apps can cause the unexpected error "Internal error in the AND/OR function Canceled Canceled" to appear. This post provides a summary of this issue.

One of the highlights of this week was a bug that was introduced during an update of Power Apps (v3.21122).

When defining Boolean conditions that incorporate the "and" or "or" operators, app builders receive the errors:

"Internal error in the AND/OR function Canceled Canceled " or "Internal error in the AND function Canceled Canceled"

A typical place where this bug occurs is in places where we call the Filter function with a complex condition that includes the "and" or "or" operators (for example, search screens).

The following post by Warren Belz provides an excellent explanation of the issue.

In a subsequent post today by Carlos Figueira, it turns out that the cause of the problem was a performance optimisation in Power Apps.

In summary, Power Apps can cancel calls to data retrieval functions such as LookUp. When such calls are nested inside logical "and" or "or" conditions, the cancellation is unhandled and manifests itself as a visible error at the higher level of the formula.

The post by Carlos provides a much more accurate and detailed description of this issue, and I recommend reading it because it offers some interesting insight in the way that Power Apps works internally.

The outcome is that the bug will be fixed. But in the interim, we can prevent this error from occurring by adding the following to OnError property of the app.

Error(Filter(AllErrors, Not ": Canceled" in Message))) 
  •   Categories: 
  • bug