cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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?

1 REPLY 1
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

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,944)