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

Notifications

Announcements

Community site session details

Community site session details

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

How do you clear a gallery's selected item?

(1) ShareShare
ReportReport
Posted on by

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
    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,989 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard