cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Scan and Record Multiple Barcodes

Hi,

 

I'm creating an app where I would like to scan and record multiple barcodes. I need to be able to exit the barcode scanner in between scans as the barcodes won't necessarily be scanned continuously. Basically I need to scan a barcode, record to multiline text input then have the ability to scan additonal barcodes and have them record to the same multiline text input. 

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Continued Contributor
Continued Contributor

Re: Scan and Record Multiple Barcodes

Pretty straightforward and I just tested to verify.  Drop your scanner button onto your app and change the OnScan code to be similar to the following:

Set(gScanData,gScanData & Char(10) & BarcodeScanner1.Value)

You can optionally drop in an If() to check if gScanData is empty so you don't get a Line Break at the beginning of course.

Then add a MultiLine Text field and set the Default to be gScanData.

 

View solution in original post

3 REPLIES 3
Highlighted
Continued Contributor
Continued Contributor

Re: Scan and Record Multiple Barcodes

Pretty straightforward and I just tested to verify.  Drop your scanner button onto your app and change the OnScan code to be similar to the following:

Set(gScanData,gScanData & Char(10) & BarcodeScanner1.Value)

You can optionally drop in an If() to check if gScanData is empty so you don't get a Line Break at the beginning of course.

Then add a MultiLine Text field and set the Default to be gScanData.

 

View solution in original post

Highlighted
Helper IV
Helper IV

Re: Scan and Record Multiple Barcodes

This works but since the first one variable is blank, I get a blank line first and then each barcode. Is there a way to remove that?

Highlighted
Frequent Visitor

Re: Scan and Record Multiple Barcodes

Probably along the lines of modifying it to use IsEmpty or IsBlank on gScanValue before the assignment.  Similar to:

If(!IsEmpty(gScanValue),Set(gScanData, BarcodeScanner1.Value),Set(gScanData,gScanData & Char(10) & BarcodeScanner1.Value))

 

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,580)