cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

How do you clear a gallery's selected item?

I'm about to go crazy. I have a gallery named "Gallery" with a button that has the code: Select(Parent). When I submit a form, I want to clear the Gallery.Selected value. How can I do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

Have you tried resetting your gallery using Reset(Gallery)? You may have to set the default of your gallery to {}.

Let me know if this doesn't work.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://thepoweraddict.com

View solution in original post

5 REPLIES 5
Super User II
Super User II

Have you tried resetting your gallery using Reset(Gallery)? You may have to set the default of your gallery to {}.

Let me know if this doesn't work.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://thepoweraddict.com

View solution in original post

Works like a charm. I tried the Reset earlier, but I guess I had to add the {} as the default. Thanks for the help.

Glad I could help! Good luck with the rest of your app! Feel free to reach out in case of any questions!

Thanks,
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

@PowerAddict 

Good call on that one.  I was browsing the official docs for info and noticed the Reset property was missing.  Very nice that you knew about this when its not even documented 😀

Thanks @mdevaney! It definitely helps to have encountered these issues firsthand 🙂

Thanks,
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (13,151)