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 / Make gallery invisible...
Power Apps
Unanswered

Make gallery invisible upon making a selection

(0) ShareShare
ReportReport
Posted on by

Hello - I am building a Power App containing a gallery that the user will select an item from after searching for it.  This is a picture of the app so far: 

jessicadduffey_0-1708984818160.png

Gallery Properties: 

Items: Filter(AllOpenRoles,StartsWith(JobReqID,Textboxsearchinput.Text))

OnSelect: UpdateContext({varSelectedItem:ThisItem})

Visible: If(IsBlank(Textboxsearchinput.Text),false,true)

 

Once the user selects a gallery item from the list, I want the gallery to disappear (as you can see, the list still remains even when the text input is populated.  I'm newer to Power Apps and am stuck on how to make this happen.  Any suggestions for a property/formula that I could use?

 

Thank you!

Categories:
I have the same question (0)
  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    Hi @jessicadduffey,

     

    Once the gallery disappears, what are you trying to do?

     

    You can add this to the OnSelect property of the gallery:

    Reset(Textboxsearchinput);

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

  • jessicadduffey Profile Picture
    on at

    @AARON_C  basically, I want the user view to look like this: 

    jessicadduffey_0-1708991547034.png

    The number selected has populated in the text input, but the list is gone.  

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @jessicadduffey,

    I think there is a contradiction in the logic of your expression...

    You said that you want the gallery to disappear once the user selects a gallery item from the list, however, you set a variable to make the gallery appear once the search text is not blank, which is contradictory.

     

    You logic will make the Gallery appear always once the search text is not blank.

     

    So if you want to make the Gallery disappear, you need to clear the searchtext after you select an item from Gallery, which is what @AARON_C mentioned previously.

     

  • jessicadduffey Profile Picture
    on at

    @Qi ah, OK...sorry, I'm a newbie and a lot of what I'm building has come from YouTube videos...I'm still learning a lot of the logic!  So, to confirm, what I'm reading is that I need to leave the Visible property of the gallery blank and instead insert Reset(Textboxsearchinput) into the OnSelect property.  Is that correct?

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @jessicadduffey,


    @jessicadduffey wrote:

     So, to confirm, what I'm reading is that I need to leave the Visible property of the gallery blank and instead insert Reset(Textboxsearchinput) into the OnSelect property.  Is that correct?


    You need to reset the TextInput control after you select an item from the Gallery.

    Just set the OnSelect of your Gallery: 

    UpdateContext({varSelectedItem:ThisItem});Reset(Textboxsearchinput)

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard