cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wbeedge
Frequent Visitor

Barcodescanner onselect / reset

The new barcode scanner has no Onselect methode.
When having a textbox bound to the barcode scanner and processing the barcode
(send mail or submit to sharepoint) there is no way to reset the text control since it's default text is set
to the barcode scanner. The barcode scanner has no reset or default value.

It would increase productivity to have this available and when having processed the data 
resetting the barcode scanner value or even having the possibility to select the barcode scanner
for the next scan.

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
dinusc
Microsoft
Microsoft

Hello @wbeedge,

Can you please confirm that you're using the latest BarcodeScanner control (as in the picture below) and not one of trhe legacy versions?Capture.PNG

 

 

The new one does not include a TextBox (Label or TextInput) control. You should be able to add any formulas, including resetting the bound TextInput control

 

 

View solution in original post

7 REPLIES 7
dinusc
Microsoft
Microsoft

Hello @wbeedge,

Can you please confirm that you're using the latest BarcodeScanner control (as in the picture below) and not one of trhe legacy versions?Capture.PNG

 

 

The new one does not include a TextBox (Label or TextInput) control. You should be able to add any formulas, including resetting the bound TextInput control

 

 

h-nagao
Impactful Individual
Impactful Individual

This blog may help you, suggesting great workaround to reset scanned text from new Barcode scanner.

https://qiita.com/tomikiya/items/5f90c43a3ce714090260
*This is in Japanese but you can translate by Google.

Thanks

I could use the feature of Select the barcode scanner once the data is processed so it would be ready to scan the next barcode. I shouldn't need to press the barcode scanner button every time I want to scan a barcode. The barcode scanner creates a button. It should have an OnSelect property. Thanks.

Hello @RUINSINK ,

 

We've recently added a new OnScan property that works similar to the OnSelect in other controls, this allows you to set a behaviour after a scan is successful.

I am facing a problem when previously scan a bar code and the result displayed in the input box without problem. But when scan a second barcode, the barcode scanner will return the previous barcode result to the input box. Is there any method to reset the barcode after first scan?

@joanneleung to answer your question, we've recently added support for reseting the control using the Reset function. Reset(BarcodeScanner1)

 

I am however interested to know how your control is setup and what makes the second value not update the input box? Does the BarcodeScanner1.Value not get updated when the second value is scanned?

Mohandar
Helper I
Helper I

I am using external scanner to scan barcodes to a textbox. on change property of textbox i am calling Save button to save the record and reset text box for next input. If I enter barcode manually or click on save button App works fine and clear text box set focus so I can enter new barcode.

When I am using barcode scanner App works for one record and clear the text box value but on second scan it save but text box still show value as my last scan. 

I am trying to clear text box so I can scan new barcode. Strange thing when I look Textbox. Text property it is "" not sure it is a bug or I am doing something wrong. can someone help me please.

Following is the code on save button.

Patch(
StecTest,
Defaults(StecTest),
{
Title:txtStecNumber.Text,
Status: ddStatus.Selected}
);

If(!IsEmpty(Errors(StecTest)),[Set(varStecError,First(Errors(StecTest)).Message),Notify(varStecError, NotificationType.Error)], [Notify("Stec Submission success",NotificationType.Success),Set(varStecError,"")]);
//Reset(txtStecNumber);
UpdateContext({varTitle:true});
UpdateContext({varTitle:false});
//txtStecNumber.Text="";
//Navigate(Screen1);
txtStecNumber.Clear;
Set(stecNumber,"");
SetFocus(txtStecNumber);

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,029)