Showing results for 
Search instead for 
Did you mean: 
Power Participant
Power Participant

How to clear the Errors for item selected in a gallery?


Hi, I have a gallery where I can select an item and then a button that deletes the selected item with Remove(MySource, Gallery1.Selected)

If there is an error deleting I can use the Errors function to get the error with: Errors (MySource, Gallery1.Selected)

But when I try to clear the errors with Revert(MySource, Gallery1.Selected) , I get the message that "The function Revert has some invalid arguments"

Any idea how I can properly formulate the Revert in this case?

Power Apps
Power Apps

Hello - Thanks for letting us know of this problem. We will fix this issue soon.


In the meantime, here is a workaround:

1. In the Gallery (Gallery1), add a control that can capture the current selection into a Context variable. If you already have a control that the user needs to click in order to select an item, just append it's OnSelect property with UpdateContext({Gallery1Selected: ThisItem}). If you don't have anything, may be an invisible rectangle that takes the full gallery template space with the above mentioned expression would do the trick.


2. Once you have the expression wired up, simply do Revert(MySource, Gallery1Selected)


Let us know if this works.

Helpful resources

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,596)