cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Reset a text input box

Hi, 

 

Hopefully this is a simple one..

I've an OnScan button with the following: UpdateContext({VAR_QRCode:BarcodeScanner.Value});Reset(QRCode_Text).

I then have a Text Input box(QRCode_Text) with the following as default: VAR_QRCode:

I would then like to reset the text input box to zero by using Reset(QRCode_Text) within an X icon. For this I use the OnSelect option. When reseting, it just returns the orginal value and not a zero. 

Can I use another option in the text input box so I can leave the default box, blank?

 

Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: Reset a text input box

If I understand you correctly, you want to set the value of the text input to the scanned value after a successful scan, but if the user clicks the text input, then you want to clear it, is that right?

If this is the case, then you can set the OnSelect property of the text input to

UpdateContext({VAR_QRCode:""}); Reset(QRCode_Text)

The Reset function will "reset" the text input control to its default value; if you call reset without changing the default, that's the value that you'll get.

If this is not what you want, can you please clarify so we can try to help you solve it?

View solution in original post

2 REPLIES 2
Highlighted
Power Apps
Power Apps

Re: Reset a text input box

If I understand you correctly, you want to set the value of the text input to the scanned value after a successful scan, but if the user clicks the text input, then you want to clear it, is that right?

If this is the case, then you can set the OnSelect property of the text input to

UpdateContext({VAR_QRCode:""}); Reset(QRCode_Text)

The Reset function will "reset" the text input control to its default value; if you call reset without changing the default, that's the value that you'll get.

If this is not what you want, can you please clarify so we can try to help you solve it?

View solution in original post

Highlighted
Helper I
Helper I

Re: Reset a text input box

Thanks, that did the trick. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,747)