web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Barcode reader to fill...
Power Apps
Answered

Barcode reader to fill a form

(0) ShareShare
ReportReport
Posted on by 32

Hi everyone,

 

I'm trying to build an application that allows our drivers to scan a barcode located in each of our cars (different ones) that launches the powerapp and send them to a form screen where the data (car brand - car licence) is prefilled based on the barcode reader.

 

I'd have two lists :

 

ListA with the cars (car brand, licence)

ListB with the check in (date, ListA car brand, ListA licence)

 

Is this possible ?

 

Thank you for your help

Categories:
I have the same question (0)
  • Hassan_SZ_365 Profile Picture
    542 on at

    Hi,
    Yes, it's possible to build an application in Power Apps that allows drivers to scan a barcode which then automatically fills in a form with data associated with that barcode. Here's a high-level approach:

    Barcode Setup: Ensure that each barcode uniquely identifies a car and is associated with the car's data in ListA.

    Power Apps Setup:

    Use the Barcode scanner control to scan the barcode.
    After scanning, use the barcode value to look up the corresponding car data in ListA.
    Data Retrieval:

    Perform a Lookup function in Power Apps to retrieve the car brand and license based on the scanned barcode value.
    Form Pre-filling:

    Pre-fill the form on the screen with the data obtained from ListA.
    ListB Entry:

    When the form is submitted, create a new entry in ListB with the check-in date and the data from ListA.
    In Power Apps, the formula to retrieve and pre-fill the data might look something like this:

     

    // On the Barcode Scanner's OnScan property
    If(
     !IsBlank(BarcodeScanner1.Value),
     Navigate('FormScreen', ScreenTransition.None)
    );
    
    // On the 'FormScreen's OnVisible property to prefill data
    Set(
     SelectedCar,
     LookUp(ListA, Barcode = BarcodeScanner1.Value)
    );
    
    // Use SelectedCar.Brand and SelectedCar.License to prefill form data

     

    Then, bind the form fields to SelectedCar.Brand and SelectedCar.License to pre-fill the data.

    Please adapt the code to fit the actual names of your controls and data fields.


    Best Regards,

    Hassan Raza

  • Verified answer
    MudassarSZ365 Profile Picture
    591 on at

    Hi FB5344,

    yes it is possible you can try the following code
    On the Barcode Scanner's OnScan property:

    Navigate(FormScreen, ScreenTransition.None, {ScannedBarcode: BarcodeScanner1.Value})
    On the FormScreen's OnVisible property or directly on the form's Item property:
    Set(
     CarDetails,
     LookUp('Car Data Source', UniqueBarcodeField = ScannedBarcode)
    );

    For the form's Default property for car brand:

    CarDetails.'Car Brand'
    CarDetails.'Car Brand'

    For the form's Default property for car license:

    CarDetails.'Car Licence'

     

  • CU13090816-0 Profile Picture
    32 on at

    Hi Mudassar,

     

    Thanks for your response it works perfectly.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard