{"id":18722,"date":"2019-05-22T13:29:50","date_gmt":"2019-05-22T13:29:50","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=18722"},"modified":"2024-01-04T12:34:35","modified_gmt":"2024-01-04T07:04:35","slug":"working-with-barcode-scanner-in-powerapps","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2019\/05\/working-with-barcode-scanner-in-powerapps\/","title":{"rendered":"Working with Barcode Scanner in PowerApps"},"content":{"rendered":"<p><strong>Introduction:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>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 lives i.e. while shopping, renting a car, attending major events, flying, and so on. They\u2019re in our social media apps and on store windows.<\/p>\n<p>Using Barcode Scanner in Power Apps we can get data or can open URLs from\u00a0<a href=\"https:\/\/www.inogic.com\/blog\/2020\/12\/using-barcode-or-qr-code-scanner-control-in-custom-html-page-in-resco-mobile-app\/\">Barcode or QR code<\/a>.<\/p>\n<p>Let\u2019s just start exploring this media by simply creating a\u00a0<strong>Barcode Scanner\u00a0<\/strong>App to get data and open URLs from Barcodes or QR codes.<\/p>\n<p>In this app we have used two scanners:<\/p>\n<ul>\n<li>To get Scan information from the Barcode or QR code.<\/li>\n<li>Open the URL that is present in the Barcode or QR code.<\/li>\n<\/ul>\n<p>1. Now select the \u201cBarcode Scanner\u201d media from the list of media as shown below screenshot:<img decoding=\"async\" class=\"aligncenter size-full wp-image-18725\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/1-30.png\" alt=\"\" width=\"723\" height=\"340\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/1-30.png 723w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/1-30-300x141.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/1-30-660x310.png 660w\" sizes=\"(max-width: 723px) 100vw, 723px\" \/><\/p>\n<p>2. After the Barcode Scanner gets added to the screen, use the formula on the \u201conScan\u201d property of the Barcode Scanner to get the value of the Barcode or QR code while scanning the code. Then using the \u201cSet\u201d method of the Barcode Scanner scanned value; set in the \u201cscanvalue\u201d variable.<\/p>\n<p style=\"padding-left: 40px;\">Set(scanValue,BarcodeScanner1.Value)<\/p>\n<p style=\"padding-left: 40px;\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18726\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/2-3.png\" alt=\"\" width=\"701\" height=\"404\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/2-3.png 701w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/2-3-300x173.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/2-3-660x380.png 660w\" sizes=\"(max-width: 701px) 100vw, 701px\" \/><\/p>\n<ol start=\"3\">\n<li>Select \u201cLabel\u201d and set \u201ctext\u201d property of label as \u201cScan Result:\u201d<\/li>\n<\/ol>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-18727\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/3-2.png\" alt=\"\" width=\"713\" height=\"327\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/3-2.png 713w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/3-2-300x138.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/3-2-660x303.png 660w\" sizes=\"(max-width: 713px) 100vw, 713px\" \/><\/p>\n<ol start=\"4\">\n<li>Select another \u201clabel\u201d to display the result of Barcode Scanner. Then set \u201cText\u201d property value as \u201cscanvalue\u201d variable that contains scan value as shown below:<\/li>\n<\/ol>\n<p style=\"padding-left: 40px;\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18728\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/4-3.png\" alt=\"\" width=\"669\" height=\"342\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/4-3.png 669w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/4-3-300x153.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/4-3-660x337.png 660w\" sizes=\"(max-width: 669px) 100vw, 669px\" \/><\/p>\n<ol start=\"5\">\n<li>Now add another scanner on the screen to open a link that is present in the code. Now set \u201cText\u201d property of BarcodeScanner2 as \u201cScan and Go\u201d:<img decoding=\"async\" class=\"aligncenter size-full wp-image-18729\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/5-2.png\" alt=\"\" width=\"693\" height=\"381\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/5-2.png 693w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/5-2-300x165.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/5-2-660x363.png 660w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><\/li>\n<li>Now set formula on \u201conScan\u201d property as \u201c<strong>Launch(BarcodeScanner2.Value)\u201d<\/strong> to open URL that is set in the barcode or in QR code. After this save the app.<img decoding=\"async\" class=\"aligncenter size-full wp-image-18730\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/6-2.png\" alt=\"\" width=\"696\" height=\"366\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/6-2.png 696w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/6-2-300x158.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/6-2-660x347.png 660w\" sizes=\"(max-width: 696px) 100vw, 696px\" \/><\/li>\n<li>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 \u201cAllow\u201d.<img decoding=\"async\" class=\"aligncenter size-full wp-image-18731\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/7-3.png\" alt=\"\" width=\"203\" height=\"316\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/7-3.png 203w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/7-3-193x300.png 193w\" sizes=\"(max-width: 203px) 100vw, 203px\" \/><\/li>\n<li>After clicking on \u201c<strong>Scan\u201d<\/strong> button mobile camera will scan barcode or QR code as shown below:<\/li>\n<\/ol>\n<p style=\"padding-left: 40px;\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18732\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/8-2.png\" alt=\"\" width=\"441\" height=\"221\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/8-2.png 441w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/8-2-300x150.png 300w\" sizes=\"(max-width: 441px) 100vw, 441px\" \/><\/p>\n<ol start=\"9\">\n<li>Scan information is displayed on mobile.<img decoding=\"async\" class=\"aligncenter size-full wp-image-18723\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/9-2.png\" alt=\"\" width=\"182\" height=\"262\" \/><\/li>\n<li>To open particular URL Click on \u201cScan and Go\u201d 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.<\/li>\n<\/ol>\n<p style=\"padding-left: 40px;\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18724\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/05\/10-3.png\" alt=\"\" width=\"139\" height=\"277\" \/><\/p>\n<p><strong>Conclusion: <\/strong>Using Barcode Scanner media in power apps we can easily scan Barcode or QR code.<\/p>\n<h3><div class=\"su-heading su-heading-style-default su-heading-align-center\" id=\"\" style=\"font-size:13px;margin-bottom:20px\"><div class=\"su-heading-inner\">Building custom Business Apps that connect to your data stored in 3rd party platforms, cloud or on-premises data sources can streamline complex business operations.<\/div><\/div><\/h3>\n<p>Our experts at <a target=\"\" rel=\"noopener\">Inogic- Professional Services<\/a> simplify the process.<br \/>\nWrite to us at <a target=\"\" rel=\"noopener\">crm@inogic.com<\/a> for experienced and trusted assistance!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: &nbsp; 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 lives i.e. while shopping, renting a car, attending major events, flying, and so on. They\u2019re in our social media apps and on store windows. Using Barcode\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2019\/05\/working-with-barcode-scanner-in-powerapps\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":18737,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[18,38,1],"tags":[572],"class_list":["post-18722","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-365-v9-2","category-microsoft-powerapps","category-uncategorized","tag-dynamics-365-powerapps"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/18722","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=18722"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/18722\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media\/18737"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=18722"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=18722"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=18722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}