Skip to main content

Notifications

Community site session details

Community site session details

Session Id : swWJ4HRjyt+0boXQKzPaYf
Power Apps - Building Power Apps
Answered

How do you clear a gallery's selected item?

Like (1) ShareShare
ReportReport
Posted on 28 Nov 2019 00:32:21 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:
  • PowerAddict Profile Picture
    7,314 Most Valuable Professional on 04 Dec 2023 at 15:34:18
    Re: How do you clear a gallery's selected item?

    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

  • Motion Profile Picture
    69 on 04 Dec 2023 at 15:33:44
    Re: How do you clear a gallery's selected item?

    Very helpful and clear. 

  • aheaven Profile Picture
    8 on 17 Feb 2023 at 23:34:41
    Re: How do you clear a gallery's selected item?

    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.

  • Wedlib Profile Picture
    103 on 15 Dec 2021 at 18:25:05
    Re: How do you clear a gallery's selected item?

    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 {}. 

  • MarkGtz Profile Picture
    3 on 25 Aug 2021 at 18:47:00
    Re: How do you clear a gallery's selected item?

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

  • PowerAddict Profile Picture
    7,314 Most Valuable Professional on 28 Nov 2019 at 02:00:53
    Re: How do you clear a gallery's selected item?
    Thanks @mdevaney! It definitely helps to have encountered these issues firsthand 🙂

    Thanks,
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • mdevaney Profile Picture
    29,987 Super User 2025 Season 1 on 28 Nov 2019 at 01:39:37
    Re: How do you clear a gallery's selected item?

    @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,314 Most Valuable Professional on 28 Nov 2019 at 00:45:54
    Re: How do you clear a gallery's selected item?
    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
  • Community Power Platform Member Profile Picture
    on 28 Nov 2019 at 00:40:36
    Re: How do you clear a gallery's selected item?

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

  • Verified answer
    PowerAddict Profile Picture
    7,314 Most Valuable Professional on 28 Nov 2019 at 00:38:27
    Re: How do you clear a gallery's selected item?
    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard