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 / Update Search Bar Text...
Power Apps
Answered

Update Search Bar Text Using a Gallery OnSelect

(0) ShareShare
ReportReport
Posted on by 65

Hi, everyone.

I need solution to a situation I've put myself in.

I have a search bar (1) which filters a gallery (2) and a button (3) to update my database.

Calheiro_0-1705678459510.png

The OnSelect property of the button (3) is to Patch a column of my database with SearchBar.Text
The Items property of my Gallery is: Filter(Database;StartsWith(DatabaseColumn;SearchBar.Text))

As you can see on the image and as mentioned above, my gallery is filtered by the first letters from my SearchBar.Text.
If I press the button (3) it will update my database with the incorrect text as I'm only typing the start of the string to filter my gallery. My objective is when I select an item from the gallery (2) it updates the SearchBar.Text with the label text inside the item for the user to press the button and patch the database (This is a way to ensure the user is typing the correct string for the update).

Calheiro_1-1705679428821.png

I can't seem to achieve this kind of interaction while still allwing the Seachbar(1) to filter the gallery.
Does anybody have a hint on what I need to do?

Categories:
I have the same question (0)
  • Verified answer
    jrletner Profile Picture
    720 Moderator on at

    Here is an example I put together showing how to update the value inside of an input when clicking on a text label. You could adapt this to serve your needs.

     

    I have an input control and three text controls. When I click on any of the text controls, the input value updates.

    jrletner_0-1705680234939.png

    In the Default property of the Input:

    jrletner_1-1705680275299.png

     

    The Reset property of the Input:

    jrletner_2-1705680324037.png

     

    The OnSelect property of the text labels:

    jrletner_3-1705680341416.png

     

    The varReset triggers an update for the Input box, setting it to a Default value of the text in the label, if that variable is empty, then the Input is reset to "" blank.

  • Calheiro Profile Picture
    65 on at

    That was an amazing answer!
    I did almost exactly as you, but instead of creating VarReset I used the Reset() function at the OnSelect property of the gallery referencing my Searchbar. It worked as intended! Thank you so much!

  • jrletner Profile Picture
    720 Moderator on at

    Fantastic! Glad you got that all worked out 🙂 

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
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard