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 searchbox not wo...
Power Apps
Unanswered

Reset searchbox not working properly

(0) ShareShare
ReportReport
Posted on by 603

I have powerapps gallery with SharePoint as the datasource. My search is working fine as per the below code. I have 2 search boxes in different screens (Landing Page, Items Page).

 

When user search from landing page, it redirects to Items page which has gallery and shows up the search results properly.

 

Landing Page SearchIcon OnSelect

Navigate('Items Screen',ScreenTransition.None)

 

When user search from Items page, it stays on same page which has gallery and shows up the search results properly.

Search Results Gallery Items Property

If(
 myfavselected,
 Filter(
 Items,
 ID in Filter(
 Favorites,
 Title = User().Email
 ).CatalogID
 ),
 Filter(
 Items,
 (Len(TextInputCanvas1_3.Value) = 0 || TextInputCanvas1_3.Value in 'Item Name' || TextInputCanvas1_3.Value in Description || TextInputCanvas1_3.Value in Text('Unit Price(USD)') || TextInputCanvas1_3.Value in 'Item Category')||
 (Len(TextInputCanvas1.Value) = 0 || TextInputCanvas1.Value in 'Item Name' || TextInputCanvas1.Value in Description || TextInputCanvas1.Value in Text('Unit Price(USD)') || TextInputCanvas1.Value in 'Item Category') && 
 ((CountRows(colSelectionGal) = 1 || 'Item Category' in colSelectionGal.Value)) && 
 (IsBlank(ComboBox3.SelectedItems) || ("Under $50" in Concat(
 ComboBox3.SelectedItems,
 Value
 ) && Amount >= 1 && Amount < 50) Or ("$50 - $100" in Concat(
 ComboBox3.SelectedItems,
 Value
 ) && Amount >= 50 && Amount < 100) Or ("$100 - $200" in Concat(
 ComboBox3.SelectedItems,
 Value
 ) && Amount >= 100 && Amount < 200) Or ("Above $200" in Concat(
 ComboBox3.SelectedItems,
 Value
 ) && Amount >= 200))
 )
)

 

 Items Page Searchbox Default Value

If(Len(TextInputCanvas1.Value)>0,TextInputCanvas1.Value)

 

May i know how to reset the TextInput boxes properly in this scenario? When i navigate between screens, the search TextInput value should reset properly.  Currently it doesnt. 

 

Hence when i search from Landing page, it redirects to Items page and search results are accurate.

However if i search from Items page, it combines the Landing page keyword and Items page keyword and the search results are inaccurate. 

 

Any advice how to avoid this?

Categories:
  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @Iantaylor2050 

     

    One possible solution is to use the Reset function in Power Apps, which resets a control to its default value.

    You can set the OnSelect property of a button or an icon to Reset (TextInput1), where TextInput1 is the name of your text input control.

    You can also set the Default property of your text input control to an empty string ("") or a variable that you can update later.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊


    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • Michael E. Gernaey Profile Picture
    53,970 Super User 2026 Season 2 on at

    Hi @Iantaylor2050 

     

    I would use either the OnSelect, or the OnChange event of both TextInput controls and reset the value there.

    As @SpongYe said you can use the Reset(ControlName), based on whatever Control you need to Reset.

     

    But where you place it is important so it resets when you intended it to.


    If you like my answer, I would really appreciate if you please Mark it as Resolved, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard