Skip to content

Sample barcode scanner built for simple warehouse use case. Uses Power Apps front end with SQL for data storage.

License

Notifications You must be signed in to change notification settings

ryanpfalz/scanner-powerapp-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scanner-powerapp-poc


Page Type Languages Key Services Tools
Sample PowerShell
Python
Azure SQL Database Power Apps

Setting up a QR/Barcode scanner Power App

This codebase is only a proof-of-concept, not a production application, and should only be used to evaluate the technologies and serve as a foundational example.

Prerequisites

Running this sample

Setting up the application components

SQL Database

Whether provisioning the SQL instance via Portal or CLI, a file called pass.txt needs to be created in the infra/ folder, and the SQL server password needs to be placed in the file.

To deploy in Azure Portal:

To deploy with Az CLI:

Creating the tables:

  • In the SQL development environment (e.g., Azure Data Studio), open and run the .sql scripts in sql/tables. This will create the following tables emulating a warehouse management system:
    • Inventory fact table
    • Orders dimension table
    • Product dimension table
    • Suppliers dimension table
  • The data model can be seen in this diagram.

Power Platform

  • Import the Power App from powerapp/package.zip into your Power Apps environment.
    • Update the database credentials with the credentials of the database created above.

Simulation & Barcodes

  • The code in simulation/main.py is used to populate the database with simulated data and generate barcodes. In addition to creating the pass.txt file as stated above, the server connection variables need to be updated in the infra/config.json to reflect the proper SQL server credentials. Both the Python & PowerShell scripts use config.json and pass.txt.

Architecture & Workflow

Azure & Power Platform diagram

A diagram visually describing the components in Azure and Power Platform.

  1. The developer(s) perform the following tasks...
    • Pushes code/schema updates out to the SQL instance in Azure.
    • Publishes updates to the Power App.
    • Run the simulation (simulation/main.py) to populate the database and generate codes.
  2. Users access the scanner app via the Power App on their mobile device.
  3. The Power App is used to scan QR/barcodes.
  4. When codes are scanned, the data read is parsed and written to the database.

Additional Resources

About

Sample barcode scanner built for simple warehouse use case. Uses Power Apps front end with SQL for data storage.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published