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 Scanner to Sha...
Power Apps
Answered

Barcode Scanner to Sharepoint List Not functional

(0) ShareShare
ReportReport
Posted on by 56

Hi, 

 

I have built a simple tracker for samples that we get in our office.

 

I created a SharePoint List, named 'Sample Tracker Inventory'. 

Barcode Reader = BarcodeReader1

Trying to get data from barcodereader1 to output in DataCardValue10

sharepoint list.png

In the SharePoint List, I have the following columns:

Title 

Barcode (single line text)

Date Item Received

Details

Sample Order #

Assigned To

Category

Customer

Branded, etc.

 

On Home screen, I have a gallery named BrowseGallery1 where I can select an item, edit the details, and submit changes.

However, I'm trying to implement a barcode scanner to be able to scan a barcode and put the value inside 'Barcode' column. This will save time with typing it in. However, I've searched all over the internet and can't find a formula that does this correctly because I'm poor at syntax. Please see below for pictures

help1.pnghelp2.pnghelp3.png

This is what I have in OnScan property of barcode reader. 

 

Patch('Sample Tracker Inventory',LookUp('Sample Tracker Inventory', WhoScanned=User().FullName),{Barcode:BarcodeReader1.Value})

 

I know I'm doing something wrong but too dumb to understand other people's posts. Any help will save me from losing my mind. Thank you in advance!!!

Categories:
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @brandonluxe,

     

    With the following code you will Patch the barcode to the list when scanning:

    Patch(
     'Sample Tracker Inventory',
     LookUp('Sample Tracker Inventory', WhoScanned=User().FullName), 
     {
     Barcode: First(BarcodeReader1.Barcodes).Value
     }
    )

     

    What you may want to do is only save the barcode to the list when the user actually submits the form:

    //OnScan
    Set(varScan, First(BarcodeReader1.Barcodes).Value)
    
    //Default property of your TextInput (will save when user submits the form)
    varScan
    
    //OnHidden of that screen
    Set(varScan, Blank())

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • brandonluxe Profile Picture
    56 on at

    Hi @LaurensM , thanks for the quick reply. I tried the first suggestion and getting these errors:

    HELP4.pngHELP5.png
    Is there an issue with 'Barcode' Column in SharePoint being Text? The reason I used text is because barcodes have text and numbers. Seems anytime I use .Value for 'Barcode' column it gives error that says it should be Text.

    Thank you,

    Brandon

  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @brandonluxe,

     

    The function seems to have issues with the WhoScanned column name. Would it be possible to double check whether this column is written correctly?

     

    With the current set-up I would expect the WhoScanned column to be of type text.

  • brandonluxe Profile Picture
    56 on at

    Hi @LaurensM , I used the second set of functions and it worked. I actually didn't even have a column in Sharepoint for WhoScanned .... lol. Thanks for your help!!

    Brandon

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard