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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (10,812)