cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohnOReilly34
Level: Powered On

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
Power Apps Staff CarlosFigueira
Power Apps Staff

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
Power Apps Staff CarlosFigueira
Power Apps Staff

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

JohnOReilly34
Level: Powered On

Re: Reset a text input box

Thanks, that did the trick. 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,768)