I've noticed an annoying trap in PowerApps recently. I have several elements on a page that update parts of a record in a context variable, using the form:
UpdateContext({ Record: Patch(Record, {field: changedvalue}) })However, if I make a mistake in one of these, it forces Record to be of type Error. Unfortunately, even if I fix the issue, the line above in other parts of the page latches Record to be of type Error, as Patch(<Error>,...) returns a type <Error>.
The only way to clear this, I've found, is to comment out all of these UpdateContexts, and then uncomment them back into the project.
I've found that even leaving the page and returning doesn't resolve the issue. Ideally, PowerApps could recalculate Errors in these recursive situations, or provide a a mechanism to allow you to reset the Error, and try again.
Is there any other methods of resolving this issue?