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 / How the barcode scan c...
Power Apps
Unanswered

How the barcode scan can automatically fill a text box

(0) ShareShare
ReportReport
Posted on by 26

Hi,

 

I've created an app where I've already registered all of our cleaning products, with the following boxes filled:

- Item code

- Item description

- Barcode

 

Now I need that, when I use the barcode scan, it automatically fill those boxes, and the only thing I have to inform it's the quantity and if it's entering or existing our warehouse.

I couldn't find in the internet the code/formula for this use. I'm not using an "galery" in the PowerApps, I'm using an "form". (image linked bellow)

Captura de tela 2023-07-18 152448.jpg
Categories:
I have the same question (0)
  • mfvelazquez Profile Picture
    17 on at

    You can perform a LookUp with data from scanning and save it in a variable.

     

    BarcodeReader1.OnScan:

    Set(
     vItemScanned,
     LookUp(
     myTableOrCollection, 
     columnToCompare = First(BarcodeReader1.Barcodes).Value
     )
    )

     

    Then you can set de Default property of each text input with values from vItemScanned variable.

  • gcmfaizan Profile Picture
    1,022 on at

    Hi @ginicolini Please try this solution:

    Set the Default property of the barcode scanner control:
    BarcodeScanner1.Value

    OnScan property add this formula to retrieve the item details, and OnScan property of the barcode scanner control triggers this formula:

    UpdateContext(
    {
    selectedItem: LookUp(
    ProductList, // Replace with the name of your product list
    Barcode = BarcodeScanner1.Value
    )
    };
    Set(itemCode, selectedItem.ItemCode);
    Set(itemDescription, selectedItem.ItemDescription)
    )

    replace "ProductList" with the actual name of your product list.

     

    Bind the itemCode and itemDescription in your form by set the Default properties of the Text input of your data cards as follows:

    • Item code field: itemCode
    • Item description field: itemDescription

    With these steps, when you scan a barcode using the barcode scanner control, the item code and item description fields in your form will be automatically populated based on the scanned barcode's match in your product list.


    Kind Regards,

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 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard