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 app ex...
Power Apps
Answered

Barcode scanner app export gallery to SharePoint list

(0) ShareShare
ReportReport
Posted on by 15

Hello,

 

I have created the barcode scanner using the following:

 

Create a canvas app with the barcode scanner control (contains video) - Power Apps | Microsoft Docs

 

I would like to export the results from the gallery to a SharePoint list.  I can easily capture the username and seem to be struggling to export the results from the gallery to the SharePoint list.

 

SharePoint list fields are:

Title: Barcode (hardcoded)

Username: Picks up User().FullName

Date: trying to get from gallery Thisitem.ScannedTime

Barcode: trying to get from gallery ThisItem.ScannedItem

 

Current scan button:

 

Collect(
colScannedItems,
{ScannedItem: BarcodeScanner1.Value, ScannedTime: Now()}
);

ForAll(Gallery3.AllItems;
Patch(BarcodeScannerApp;Defaults

 

Any help would be appreciated.  Or should I just export the gallery items to text boxes and then patch to SharePoint list?

 

Categories:
  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Hi @Lift4life ,

    Assuming the field names in your list are the same as the ones in your Collection

    Patch(
     BarcodeScannerApp
     ForAll(
     colScannedItems As aPatch,
     {
     ScannedItem: aPatch.ScannedItem,
     ScannedTime: aPatch.ScannedTime
     }
     )
    )

    You could also Patch the gallery, but the collection is more direct.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • Lift4life Profile Picture
    15 on at

    @WarrenBelz  Thank you for the details.  I went a different direction and seems to be working a little better.  

     

    Now when you scan, it add the info to text boxes seen below

     

    Scan button:

     

    Collect(
    colScannedItems,
    {ScannedItem: BarcodeScanner1.Value, ScannedTime: Now()}
    )

     

    Text box 1:

    Gallery3.Selected.ScannedItem

    Textbox 2:

    Gallery3.Selected.ScannedTime

     

    Export to SharePoint button:

    Patch(BarCodeScannerList,
    {Username:User().FullName, Barcode:Barcoderesults.Text,Title:"Barcode Entry",Date:Dateandtimeresults})

     

    The problem is the date and time gives an error when trying to import to SharePoint because I believe it's a formatting issue.  Not to mention, date:dateandtimeresults needs an extension?

     

    Thoughts on what I am missing?

     

    Lift4life_1-1654627777618.png

     

    Lift4life_2-1654627909724.png

     

  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Hi @Lift4life ,

    I thought you wanted to Patch the Collection. Also where is Dateandtimeresults coming from ?

  • Lift4life Profile Picture
    15 on at

    @WarrenBelz  Apologies I forgot to mention Textbox1 (top text box) = Barcoderesults Textbox2 (Bottom text box) = Dateandtimeresults.

     

    Visually:

    Lift4life_0-1654632734710.png

     

    I moved away from the collection patching right away because it's better to have a review of the barcode before patching it to SharePoint list.

  • Verified answer
    WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    @Lift4life ,

    Assuming you have a valid date format in there, you will get a date with

    DateValue(Barcoderesults.Text)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Verified answer
    Lift4life Profile Picture
    15 on at

    Thank you, will give it a shot.

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 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard