Tutorials/Power Apps/Mobile Inventory with Power Apps Barcode Scan
Power Appsintermediate

Mobile Inventory with Power Apps Barcode Scan

Track stock, process receipts, and update product details on the go using nothing more than the camera on your phone.

NA
Narmer Abader
@narmer · Published June 3, 2026

When a retail warehouse needs to move fast, tap-and-type interfaces slow everyone down. A barcode scanner control turns any phone or tablet into a purpose-built data capture device. Instead of searching for product codes, staff can scan, see details, and update quantities instantly. Building this kind of tool doesn't require a big budget — just a SharePoint list, a simple canvas app, and the built-in media controls.

This walk‑through uses a Contoso Electronics scenario. The store keeps an inventory of laptops, tablets, and accessories. Associates scan items to view product info, adjust stock, and receive new shipments in bulk.

Designing the Data Foundation

Start by creating a SharePoint list to hold your inventory. A list gives you a secure, multi‑user back end without any extra infrastructure.

Create a new list named Electronics Inventory and add these columns:

Column NameTypePurpose
ProductNameSingle line of textFriendly product title
CategoryChoiceLaptop, Tablet, Accessory
BarcodeIDSingle line of textUnique barcode number (ISBN, UPC, etc.)
StockQuantityNumberCurrent units on hand

Populate the list with a few items so you can test scanning later. Here are some examples:

ProductNameCategoryBarcodeIDStockQuantity
MacBook Pro 14"Laptop12345678901212
iPad AirTablet98765432109825
USB‑C HubAccessory45678901234540

Performance tip: If your list will grow beyond 500 items, create an indexed column for BarcodeID. Lookup operations rely on this field, and indexing avoids delegation warnings.

Building the Detail Screen

The first screen a user sees after scanning should clearly show the product and let them edit the quantity.

  1. Create a new phone canvas app from blank.

  2. Rename the screen to ProductDetailScreen.

  3. Add a label at the top for a title (e.g., “Product Details”).

  4. Insert an Edit form and connect it to the Electronics Inventory data source. Set its Item property to a variable that will hold the current record:

    powerfxEdit form Item
    varActiveProduct

    Because the variable doesn’t exist yet the form will show a red error — that’s normal.

  5. Add a Barcode scanner control and a camera icon on top of it. The camera icon triggers the scan. Style the scanner to look like a button:

powerfxScanner appearance properties
Align: Right
BorderStyle: None
Color: White
Fill: RGBA(0, 134, 208, 1)
RadiusTopLeft: 180
RadiusTopRight: 180
RadiusBottomLeft: 180
RadiusBottomRight: 180
Width: 64
Height: 64

Scan and Look Up

When a barcode is scanned, the app looks up the product in SharePoint. If found, the form displays the data; if not, the app notifies the user.

Wire the following code to the OnScan property of the scanner control:

powerfxOnScan – scanner
Set(
  varActiveProduct,
  LookUp(
      'Electronics Inventory',
      BarcodeID = btnScanner.Value
  )
);
If(
  IsBlank(varActiveProduct),
  Notify("Product not found", NotificationType.Error),
  (ResetForm(frmProduct); EditForm(frmProduct))
)

Add a Select() call to the camera icon’s OnSelect to start the scanner:

powerfxOnSelect – camera button
Select(btnScanner)

Now you can test the scan flow in preview. When a known barcode is scanned, the form should fill with the correct product.

Managing Stock Adjustments

Once a product is loaded in the form, staff can update the quantity and save changes.

Place a Save button in the title bar and put this code in its OnSelect:

powerfxOnSelect – Save button
SubmitForm(frmProduct)

After the form submits, the variable should be refreshed so the screen shows the latest quantity. Use the form’s OnSuccess property:

powerfxOnSuccess – form
Set(varActiveProduct, frmProduct.LastSubmit);
Notify(
  "Saved: " & varActiveProduct.ProductName,
  NotificationType.Success
)

Everything works because LastSubmit contains the record that was just written, including the new StockQuantity.

Creating a Master List Screen

A list view lets users browse the whole inventory and tap an item to jump to the detail screen.

  1. Add a blank screen named ListScreen.

  2. Add a label with the title “Inventory List”.

  3. Insert a Vertical gallery connected to Electronics Inventory.

  4. Inside the gallery, add two labels:

    • One to show product name, category, and barcode:
    powerfxGallery label – details
    "Name: " & ThisItem.ProductName & " | " & ThisItem.Category & " | " & ThisItem.BarcodeID
    • Another to show the stock quantity:
    powerfxGallery label – quantity
    ThisItem.StockQuantity

When a user taps an item in the gallery, navigate to the detail screen with that product loaded. Write this in the gallery’s OnSelect:

powerfxGallery OnSelect
Set(
  varActiveProduct,
  LookUp(
      'Electronics Inventory',
      BarcodeID = ThisItem.BarcodeID
  )
);
EditForm(frmProduct);
Navigate('ProductDetailScreen')

Add a back button on the ProductDetailScreen to return to the list:

powerfxBack button OnSelect
Navigate('ListScreen')

Barcode Scan from the List

Because the list screen is the home screen, add a Barcode scanner there too. Follow the same pattern as before — place a scanner and a camera icon, keep the code in OnScan identical but use the scanner’s own name:

powerfxOnScan – list scanner (abbreviated)
Set(
  varActiveProduct,
  LookUp('Electronics Inventory', BarcodeID = lstScan.Value)
);
If(
  IsBlank(varActiveProduct),
  Notify("Product not found", NotificationType.Error),
  (EditForm(frmProduct); Navigate('ProductDetailScreen'))
)

Receiving Bulk Shipments

Warehouse receipts often involve scanning many items of the same product in a row. The app can stay in a continuous scan mode and increase the quantity by one each time a valid barcode appears.

  1. Add an Add icon on the top‑right of ListScreen.
  2. Insert another Barcode scanner and set its Visible property to false.
  3. Code the invisible scanner’s OnScan as follows:
powerfxOnScan – bulk receiver
Set(
  varActiveProduct,
  LookUp('Electronics Inventory', BarcodeID = recvScanner.Value)
);
If(
  IsBlank(varActiveProduct),
  Notify("Item not found", NotificationType.Error),
  Set(
      varActiveProduct,
      Patch(
          'Electronics Inventory',
          varActiveProduct,
          {StockQuantity: varActiveProduct.StockQuantity + 1}
      )
  );
  Notify(
      "Increased stock of " & varActiveProduct.ProductName & " by 1.",
      NotificationType.Success
  )
);
Select(recvScanner)

This code loops: when a scan finishes, it immediately opens the scanner again via Select(recvScanner). The associate keeps scanning while the app automatically increments each product. Pressing Cancel on the scanner stops the session.

Pro-tip: On a real device, the scanner shows a blue overlay while active. The app remains responsive, so a user can cancel at any time.

Troubleshooting and Best Practices

Scanners don't respond Make sure every variable referenced in OnScan exists. If you get a blue‑underlined error in the formula bar, set the variable explicitly on app start or screen OnVisible.

Delegation warnings for LookUp When a SharePoint list grows beyond 2,000 items, a non‑indexed lookup falls back to a non‑delegable filter. Add an index on the BarcodeID column and use that column in the search.

Camera permissions The barcode scanner requires camera access. If the scanner doesn't start on a physical device, check the device permissions under Settings > Privacy > Camera.

Form not refreshing after save Always call ResetForm() before EditForm() to clear the previous record’s state. The code in the scan flow already does this.

Scanner not re‑opening in batch mode The Select(recvScanner) call must happen after the Patch completes; otherwise the scanner may start before the variable updates. The order shown in the bulk‑receive code handles this correctly.

Final Recommendation

Power Apps barcode scanning turns a phone into a practical, low‑cost inventory tool. With just two screens, a SharePoint list, and a handful of formulas you can cover the core warehouse flow: look up, update, and bulk receive. The same pattern works for asset tracking, library check‑out, or field equipment management.

If the business requires approval workflows or email notifications after a receipt, connect this app to a Power Automate flow triggered by the OnSuccess event. That keeps the app lean while still integrating with broader processes.

References