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 / Set Item property for ...
Power Apps
Unanswered

Set Item property for Barcode Reader control

(0) ShareShare
ReportReport
Posted on by 81

I have a barcode reader control on my edit screen.

 

The new control scans the values to a table.

 

I have my OnScan property as:  Set(varScanArt, First(BarcodeReaderArt.Barcodes).Value)

 

I need to set the item property of my form and that is where I am struggling.

 

I tried this:

LookUp(Pieces, First(BarcodeReaderArt.Barcodes).Value = varScanArt) - it works but it pulls the first value in the entire table and not what I just scanned.

 

Appreciate any assistance.  

Categories:
I have the same question (0)
  • narayan225 Profile Picture
    2,547 Moderator on at

    @SoniaW316 

     

    You are using to LookUp an item in the Pieces table. But when using the LookUp you are comparing the barcode table with varScanArt which also contains barcodes.

     

    Try using this.

    LookUp(Pieces,columnName = First(BarcodeReaderArt.Barcodes).Value)

    There are more tutorials here if you need any:

    https://www.spguides.com/powerapps-barcode-scanner/

     

    Cheers!

  • SoniaW316 Profile Picture
    81 on at

    So I have 4 screens I need to navigate to.  I will put the barcode reader on each of the four.  

    SoniaW316_0-1692110361290.png

    I want to scan a qr code and populate both the details portion and the edit details of this form?  Only the bottom form gets submitted since it's open for edits.  

     

    I used LookUp(Pieces, First(BarcodeReaderArt.Barcodes).Value = varScanArt) which holds but only pulls the first item from the Dataverse table and not what I just scanned.

     

    I tried Filter(Pieces,'Install Location'=varScanArt) - obviously errors.

     

    Just using the variable from the Set isn't working.

     

  • narayan225 Profile Picture
    2,547 Moderator on at

    @SoniaW316 

     

    You will need to set the OnScan property of barcode reader to:

    Collect(
     colScannedItems,
     {ScannedItem: First(BarcodeReader1.Barcodes).Value}
    )

    After that, use the following formula to get the scanned item from your data source.

    LookUp(Pieces,columnName = First(colScannedItems).ScannedItem)

    Replace columnName from above formula to the column that exists in Pieces table/list.

     

    Cheers!

  • SoniaW316 Profile Picture
    81 on at

    These forumlas worked but it just says getting your data and never retrieves anything.

     

    The QR Code has 3 pieces of data embedded, Install Location, Piece # and Job.  I tried using all 3 column names and it was the same result.

     

    I appreciate you helping me with this!

  • narayan225 Profile Picture
    2,547 Moderator on at

    @SoniaW316 

     

    What is your formula for the onscan property of the barcode reader and item property of the form?

     

    Also, when you can QR Code/Barcode, it will send you just one value to your app. You are saying that it has 3 piece of data embedded, what do you mean?

     

    When using the lookup, you need to compare the value you are getting to the column that you have in SharePoint to access that record.

     

    Cheers!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard