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 / Submit the Barcode Gal...
Power Apps
Answered

Submit the Barcode Gallery data to Sharepoint using ForAll, Patch and Concat Functions

(0) ShareShare
ReportReport
Posted on by 108

Hello Experts,

 

I am a beginner to PowerApps.

currently trying to create a Barcode Scanner App. the app is basically for collecting the data and arranging it based on the category.

I am facing the below issue. please help:

 

Q): I am trying to submit the PowerApps barcode’s gallery data to Sharepoint list. I am using ForAll, Patch and Concat functions for that:

When the data transferred to Sharepoint list, the barcodes column data are not separated properly. I don’t know how to use the concat function correctly. So far the barcodes column data are separated by “**”.

 

 

 

I wanted to change this and I want the barcode column data needs to make it as separate lines (line by line) in one row.

 

Example: the data i need on the below format using Concat function.

Serial Number

Barcode

1

2

3

35663467

24567705

57889887

 

Kindly assist.

Thanks.

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    @Fajna ,

    For the barcodes try

    Concat(
     getmultiplebarcodes, 
     Gallery.Selected.NewCode, 
     Char(10)
    ), 

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Fajna Profile Picture
    108 on at

    Hello Sir,

     

    Thanks for the reply.

    The concat function is working fine.

     

    But still, the transferred data on Sharepoint List is having some issues.

     

    1st scenario: Only the first barcode is reflected correctly, and the first barcode is duplicating rest of the barcodes.

    Eg: When I scanned 2 barcodes, and transferred the data to Sharepoint, I am getting the first barcode correctly and the 2nd barcode is the duplication of the first barcode.

    When I scanned 3, showing all those 3 barcodes as same as the first barcode.

     

    2nd scenario: the transaction is duplicating asper the count of barcodes.

    Eg: When I scanned 2 barcodes, and transferred the data to Sharepoint, I am getting 2 different transactions under same details. When I scanned 3, I am getting 3 duplicate transactions in Sharepoint.

     

    How can I fix this and show all the correct scanned barcodes values under one transaction?

    Kindly Assist.

    Thanks.

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

    Hi @Fajna ,

    I am a bit unclear here where getmultiplebarcodes comes into this. If you want to Patch the Items from the Gallery you would do this, but what exactly is the field structure in the Gallery ?

    ForAll(
     Galleryl.AllItems As aCodes,
     Patch (
     'Virtual Bingo Sheet Collection', 
     (
     BarCode: 
     Concat( 
     aCodes.NewCode, 
     Char(10)
     ), 
     'No of BarCode Selected': TextInput7.Text, 
     'Scanned By': TextInput3.Text,
     'Scanned Date': Now()
     }
     )
    );

     

  • Fajna Profile Picture
    108 on at

    Hi Sir,

     

    The above formula with “aCodes” is not working for me.

    getmultiplebarcodes is the collection for Barcodes.

     

    This is the formula applied under Barcode Scanner: 

     

    Please Help.

    Thanks.

     

     

     

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

    @Fajna ,

    I sort of guessed that but you have to refer to the gallery or the collection - not both when you do a ForAll Patch. So you have another collection 'Virtual Bingo Sheet Collection' where you want to patch all the records from Gallery1, but also want to include records from getmultiplebarcodes, so how is getmultiplebarcodes  connected to the controls or fields in Gallery1?

  • Fajna Profile Picture
    108 on at

    Hello Sir,

     

    Gallery1 connected to colNewCodes.

    Actually I am not sure about the formula being correct.

    I am still under learning stage.

    Appreciate if Could you help me writing the correct formula.

     

    Thanks.

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

    @Fajna ,

    OK - we now have another collection colNewCodes involved in this, so it is getting more confusing. The main thing I initially need to know is how getmultiplebarcodes is related / connected with either the Gallery or colNewCodes.

  • Fajna Profile Picture
    108 on at

    Hello Sir,

    Initially my gallery was connected to getmultiplebarcodes.

     

    Based on my previous topic about “How to convert the first 4 digit of Barcode scanned value that starts with a particular value to particular text?” you have helped me with the below solution formula:

     

    Thank you.

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

    @Fajna ,

    So how can you reference  getmultiplebarcodes if it is not in any way connected to the gallery or colNewCodes. ? You probably need something like

    ForAll(
     Galleryl.AllItems As aCodes,
     Patch (
     'Virtual Bingo Sheet Collection', 
     (
     BarCode: aCodes.NewCode, 
     'No of BarCode Selected': TextInput7.Text, 
     'Scanned By': TextInput3.Text,
     'Scanned Date': Now()
     }
     )
    );

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • Fajna Profile Picture
    108 on at

    Dear Sir,

     

    Yes Sir, getmultiplebarcodes is connected to colNewCodes. (you created the colNewCodes formula from getmultiplebarcodes).

     

    And the formula which you gave still not working for me.

     

    Please Help.

    Thanks

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
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard