web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How do you clear a gal...
Power Apps
Answered

How do you clear a gallery's selected item?

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

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?

Categories:
I have the same question (0)
  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    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
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

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

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    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
  • mdevaney Profile Picture
    29,991 Moderator on at

    @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 😀

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Thanks @mdevaney! It definitely helps to have encountered these issues firsthand 🙂

    Thanks,
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • MarkGtz Profile Picture
    3 on at

    Thanks a lot !!! If it worked great for me, I avoid a lot of problems from several months ago🤣

  • Wedlib Profile Picture
    103 on at

    Well noted pwrappr01!

     

    Just to be more clear if someone searches for it...

    if you just Reset(Gallery) it returns to the Gallery default item, that is the first-row record by definition.

    If the desired result is a non-Selected item you should go to the Gallery properties and change the Default parameter to {}. 

  • aheaven Profile Picture
    8 on at

    This works well. I have two galleries and wanted to reset the one if I clicked an item in the other and vise versa. I had to use the Reset(gallery1) for the onselect of the item in gallery2 and Reset(gallery2) for the onselect of the item in gallery1. This works with the {} combination on the default property. Works well and exactly what I needed.

  • Motion Profile Picture
    69 on at

    Very helpful and clear. 

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

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

     

    Thanks!

    Hardit Bhatia

    Microsoft Business Applications MVP

    Microsoft Certified Trainer MCT

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard