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

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

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


Microsoft Ignite

This will be a conference that you do not want to miss!


New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,724)