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 to unfocus selecte...
Power Apps
Answered

How to unfocus selected record in gallery?

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey everybody,

Just go a little question and it should be quite easy to answer.

 

If I click a record in the gallery, then it'll be focused.

But how to disable the focus of the record again if I click on the record of the gallery?

 

Thanks so much for helping!

Categories:
  • eka24 Profile Picture
    20,925 on at

    Can you show a screenshot

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @eka24,

     

    If I don't want a default item selected on the gallery, I can set the default property to {}.

    Then the gallery has no focus by default. But if I click the gallery again, then it'll focus again. That's what I like.

     

    But what I'd like to achieve is, if I click again, then the item should not be selected again (no focus).

    I've tried following for the Gallery:

    OnSelect              {}

    OnSelect              SetFocus(Label)

     

    But there's no chance to disable the selection for the Gallery.

     

    Does anyone know how to achieve it?

     

    Thanks so much for helping!

    Unselect record.PNG
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Only need to set two variables to achieve this function.I've made a test for your reference:

    1\Set the Gallery's OnSelect property to :

     

    Set(var,!var);Set(default,ThisItem);Reset(Gallery1) /*var and default is my variables*/

     

    2\Set the Gallery's Default property to :

     

    If(var,{},default)

     

    37.gif

    Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey @v-bofeng-msft,

     

    Thanks for your help 😀. It's working...

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard