cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Joyce349801
New Member

Reset Text Input / Search Box when user clears text by Backspacing

Hi all,


I am in the midst of building an app which returns event details (time and location) for a particular person when his/her email address is keyed, followed by hitting 'Enter' or clicking on a 'Search Icon'. E.g., mike@gmail.com --> Venue A, Time 10:00am; sally@gmail.com --> Venue B, Time 11:00am.

 

We anticipate users to search for event details where their colleagues may be at and will have to reset the text input/search bar after each search is completed. So far, I have been successfully configure the following reset options:

1. Having a 'cancel search' icon to the right of the search bar - users can click on the icon to clear the text in the text input/search bar and it will simultaneously 'reset' the search bar.

2. Using the OnSelect to reset the text input/search bar when the user lands a mouse click in the search bar.

 

However, many folks would 'Backspace' or 'Ctrl+A --> Backspace' to clear the search bar - I am not able to configure a reset for the text input/search bar without triggering a circular reference error. Any advice on how to configure this will be much appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @Joyce349801,

Not sure if I understand your description, do you want to create a variable to reset the Text Input control?

 

Actually, you could set a variable by clicking a button and then apply it for the Default property of the text input control.

1). Add a button and set OnSelect as below:

Set(varReset,"")

2). Set the Default property of the Text Input as below:

varReset

So once you click the button, the TextInput will clear itself automatically.

Best Regards,
Qi

View solution in original post

1 REPLY 1
v-qiaqi-msft
Community Support
Community Support

Hi @Joyce349801,

Not sure if I understand your description, do you want to create a variable to reset the Text Input control?

 

Actually, you could set a variable by clicking a button and then apply it for the Default property of the text input control.

1). Add a button and set OnSelect as below:

Set(varReset,"")

2). Set the Default property of the Text Input as below:

varReset

So once you click the button, the TextInput will clear itself automatically.

Best Regards,
Qi

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (4,319)