Managing inventory, assets, or any large set of items in an enterprise can quickly become cumbersome if done manually. PowerApps, combined with SharePoint, allows IT professionals and business users to build custom solutions that streamline these workflows.
One of the most powerful features in PowerApps is barcode scanning. By scanning barcodes, users can instantly retrieve information from a SharePoint list or, if the item doesn’t exist, create a new record on the fly.
In this article, I’ll break down how to implement a barcode scanning workflow in PowerApps that:
- Collects scanned barcodes into a temporary collection
- Looks up each scanned item in a SharePoint list
- Redirects users to a creation screen if the barcode doesn’t exist
I’ll also provide practical tips and real-world considerations from my experience building inventory apps with PowerApps.
Why Use PowerApps for Barcode Scanning?
Using barcodes in your PowerApps solution provides several advantages:
- Speed and accuracy: Manual data entry is error-prone; scanning eliminates most human errors.
- Real-time SharePoint integration: Instant lookup against an existing asset list ensures data consistency.
- Offline capability: Collections can temporarily store scanned items for batch processing, even if connectivity is intermittent.
- Flexibility: Barcodes can trigger workflows, conditional logic, and automated creation of new items if missing.
Scenario: Scan, Lookup, and Conditional Creation
In my recent project, I created an inventory PowerApp for a medium-sized business. The goal was simple:
- Scan multiple barcodes and store them in a temporary collection.
- Lookup each scanned barcode against the ‘Asset Database’ SharePoint list.
- If the barcode exists, alert the user; if not, redirect them to a screen to create a new record.
The challenge was handling nonexistent barcodes elegantly without breaking the scanning workflow or losing already scanned items.
Step 1: Setting Up the Collection
Collections in PowerApps are temporary, client-side storage structures. They allow you to hold scanned barcodes in memory before submitting them to SharePoint.
Example:
Collect(colScannedItems, {Value: Value(BarcodeScanner.Value)})
colScannedItems– the collection storing all scanned barcodes.Value(BarcodeScanner.Value)– ensures the scanned barcode is treated as a number (or text if needed).
Tip: Always initialize your collection when the app starts to avoid errors:
ClearCollect(colScannedItems, [])
Step 2: Lookup in SharePoint
Once a barcode is scanned, we need to check if it already exists in either the local collection or the SharePoint list.
Logic breakdown:
- If the barcode already exists in the collection → notify the user.
- If it doesn’t exist in SharePoint → redirect to a creation screen.
- Otherwise, add it to the collection.
Implementation:
If(
!IsBlank(LookUp(colScannedItems, Value = BarcodeScanner.Value)),
Notify("Scanned Barcode Already Exists"),
If(
IsBlank(LookUp('Asset Database', 'Asset Number' = BarcodeScanner.Value)),
Collect(colScannedItems, {Value: Value(BarcodeScanner.Value)});
Navigate(Screen2),
Collect(colScannedItems, {Value: Value(BarcodeScanner.Value)});
Notify("Barcode added to collection")
)
)
Explanation:
LookUp(colScannedItems, Value = BarcodeScanner.Value)checks the temporary collection.LookUp('Asset Database', 'Asset Number' = BarcodeScanner.Value)queries the SharePoint list.Notify()alerts the user when the barcode is already present.Navigate(Screen2)redirects the user to a screen where they can create a new item if it doesn’t exist.
Real-world tip: Always test this formula with different data types (text vs numeric barcodes) because mismatched types can cause lookups to fail silently.
Step 3: Creating a New SharePoint Item
If the barcode isn’t found in SharePoint, redirecting the user to a creation screen is essential for maintaining data integrity.
Example form submission formula:
Patch(
'Asset Database',
Defaults('Asset Database'),
{
'Asset Number': Value(txtBarcode.Text),
'Asset Name': txtAssetName.Text,
'Location': drpLocation.Selected.Value,
'Status': "Active"
}
);
Back()
Explanation:
Patch()inserts a new record into SharePoint.Defaults('Asset Database')ensures a new record is created.- Text inputs and dropdowns populate SharePoint fields dynamically.
Back()returns the user to the scanning screen for continued workflow.
Step 4: Enhancing User Experience
From my experience, UX considerations are crucial for a high adoption rate:
- Real-time validation: Notify users immediately if a barcode already exists.
- Batch scanning: Allow multiple scans before submitting to SharePoint to improve efficiency.
- Offline support: Store scanned items in a collection so users can continue scanning without network connectivity.
- Error handling: Display a friendly message if the SharePoint list is inaccessible.
Step 5: Performance Tips
PowerApps can slow down with large SharePoint lists. Here’s how I optimize performance:
- Delegation: Use
LookUp()orFilter()carefully because non-delegable queries will only process 500 items by default. Increase the limit in App Settings or redesign the query to use delegable functions. - Indexing SharePoint columns: Index fields like
'Asset Number'to improve lookup speed. - Collection batching: Store scanned items locally first, then batch-submit to SharePoint using
ForAll()andPatch().
Sample Workflow Diagram
Here’s a high-level workflow for your PowerApps barcode app:
- Scan Barcode → triggers
OnScanformula. - Check Collection → if exists, notify.
- Check SharePoint → if exists, add to collection; if not, navigate to creation screen.
- Create New Item →
Patch()to SharePoint. - Return to Scan Screen → continue scanning.
Common Challenges and Solutions
| Challenge | Solution |
|---|---|
| Barcode not recognized | Ensure camera has good lighting; use high-quality codes; test scanner settings. |
| Non-delegable lookups on large lists | Use indexed SharePoint columns; reduce delegation; implement filtering. |
| Duplicate scans | Check both collection and SharePoint before adding; notify users immediately. |
| Offline scanning | Cache scanned items in collections; submit when network is available. |
Pro Tip: Always perform user testing with realistic volumes of barcodes to ensure the scanning, collection, and lookup processes perform smoothly under real-world conditions.
Conclusion
Building a PowerApps barcode scanning solution that integrates with SharePoint is a powerful way to streamline asset tracking, inventory management, and auditing workflows. By combining collections, lookups, and conditional creation, IT professionals can ensure accuracy, efficiency, and flexibility.
Key takeaways:
- Initialize and manage a collection for scanned items.
- Perform LookUp() checks against both the collection and SharePoint list.
- Redirect users to a creation screen if a barcode is not found.
- Optimize for performance, UX, and delegation.
- Use Patch() for dynamic SharePoint item creation.
With these best practices, your PowerApps barcode solution will not only work reliably but will also scale to enterprise-level workflows efficiently.

From my early days on the helpdesk through roles as a service desk manager, systems administrator, and network engineer, I’ve spent more than 25 years in the IT world. As I transition into cyber security, my goal is to make tech a little less confusing by sharing what I’ve learned and helping others wherever I can.
