Re: How to read the content of QR code in Image control
In Power Apps, you can use the QR code scanning capability provided by the Power Apps Barcode Scanner control to read the content of a QR code from an image control. Here's how you can achieve this:
Add a Barcode Scanner control: Go to the Insert tab in Power Apps Studio, click on "Media," and select "Barcode scanner" from the list. This will add the Barcode Scanner control to your screen.
Set the Image property of the Barcode Scanner control: Set the Image property of the Barcode Scanner control to the Image property of your image control. This will ensure that the Barcode Scanner control scans the image displayed in the image control.
Handle the OnScan property of the Barcode Scanner control: Double-click on the Barcode Scanner control to open its properties. In the formula bar, enter the following formula
Set(ResultTextBox.Text, BarcodeScanner1.Value)
Replace ResultTextBox with the name of your text box control where you want to display the QR code content. Replace BarcodeScanner1 with the name of your Barcode Scanner control if it's different.
This formula sets the text property of the specified text box control to the value of the Barcode Scanner control when a QR code is successfully scanned.
Display the result in a text box: Add a text box control to your screen, and set its Text property to ResultTextBox.Text. This will display the content of the QR code that was scanned.
Test the app: Run the app and select an image with a QR code in the image control. The Barcode Scanner control will scan the QR code, and the result will be displayed in the text box.
By following these steps, you can read the content of a QR code from an image control in Power Apps and display it in a text box.