Working with Barcode Scanner in PowerApps

By | May 22, 2019

Introduction:

Barcodes provide a convenient way to pass information from the real world to your app. We see the use of barcode and barcode scanners in our everyday life i.e. while shopping, renting a car, attending major events, flying and so on. They’re in our social media apps and on store windows.

Using Barcode Scanner in Power Apps we can get data or can open URL from Barcode or QR code.

Let’s just start exploring this media by simply creating a Barcode Scanner App to get data and open URL from Barcodes or QR code.

In this app we have used two scanners:

  • To get Scan information from Barcode or QR code.
  • Open URL that is present in Barcode or QR code.
  1. Now select the “Barcode Scanner” media from the list of media as shown in below screenshot:
  2. After Barcode Scanner gets added in screen, use the formula on “onScan” property of Barcode Scanner to get the value of Barcode or QR code while scanning code. Then using “Set” method of Barcode Scanner scanned value; set in “scanvalue” variable.

Set(scanValue,BarcodeScanner1.Value)

  1. Select “Label” and set “text” property of label as “Scan Result:”

  1. Select another “label” to display the result of Barcode Scanner. Then set “Text” property value as “scanvalue” variable that contains scan value as shown below:

  1. Now add another scanner on the screen to open a link that is present in the code. Now set “Text” property of BarcodeScanner2 as “Scan and Go”:
  2. Now set formula on “onScan” property as “Launch(BarcodeScanner2.Value)” to open URL that is set in the barcode or in QR code. After this save the app.
  3. Now open an app in mobile to scan barcode or QR code. Initially the app will ask for camera permission because one can scan barcode or QR code by using mobile camera. Next click on “Allow”.
  4. After clicking on “Scan” button mobile camera will scan barcode or QR code as shown below:

  1. Scan information is displayed on mobile.
  2. To open particular URL Click on “Scan and Go” Button. In the below example, we have used QR code related YouTude video. After scanning, the YouTube app will open in mobile and the video will start playing.

Conclusion: Using Barcode Scanner media in power apps we can easily scan Barcode or QR code.

Leave a Reply

Your email address will not be published. Required fields are marked *