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 / Reset Search Text Box
Power Apps
Answered

Reset Search Text Box

(0) ShareShare
ReportReport
Posted on by 53

I'm having trouble with resetting a search box. So my app has a main screen and there is a search box on this screen

This is the main screenThis is the main screen

So the user is able to type in what they are looking for and when they click the search Icon, it brings them to the gallery with the item they typed in as a filter

 

The OnSelect of the search Icon is :

ClearCollect(SearchRecord, MainSearchText.Text);
Navigate(BrowseScreen,ScreenTransition.Fade);

 

So far, this all works. On the BrowseScreen, the seachtextbox.Default is set to :

(If(!IsBlank(First(SearchRecord).Value), First(SearchRecord).Value, ""))

 

And the gallery Item is set to:

Filter('Table', TextSearchBox1.Text in Name || TextSearchBox1. Text in 'Pn' || TextSearchBox1.Text in 'Supplier Pn')

 

The issue I am having is that when the user clicks the "Home" Icon, I want the search bar to reset. I know that it isn't resetting because the default of this search text box is set to 

(If(!IsBlank(First(SearchRecord).Value), First(SearchRecord).Value, ""))

 

So even when I call the Reset(SearchTextBox), it is defaulting back to the default code. Is there any way around this ?

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    RusselThomas Profile Picture
    4,014 on at

    Hi @KarlAddi ,

    By your design, wouldn't the search bar reset (or at least, be set to "") if you cleared SearchRecord using 

     

    Clear(SearchRecord)

     

    before you reset the search bar?

    Kind regards,

    RT

  • KarlAddi Profile Picture
    53 on at

    I knew it was an easy fix I just couldn't figure it out. Thank you very much !!! 🙂 🙂 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard