web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : V5kxhhi/Fl99Kns6ho0VTh
Power Apps - Building Power Apps
Unanswered

Scan to a form

Like (0) ShareShare
ReportReport
Posted on 2 Mar 2021 20:34:52 by 48

Hello!

I would like that when I scan a Barcode, the result would be placed inside the form in the sequence. R1, R2, R3, ...

SCAN.JPG

Thank you

Categories:
I have the same question (0)
  • Larussa Profile Picture
    48 on 04 Mar 2021 at 22:37:22
    Re: Scan to a form

    @rubin_boer 

    Hi

     

    look at this, please. Did I do correct?I believe I didn't. it didn't work

    scan10.jpg

    scan11.jpg

     

  • rubin_boer Profile Picture
    4,841 Super User 2024 Season 1 on 04 Mar 2021 at 07:55:13
    Re: Scan to a form

    hi @Larussa Ok.

     

    On the scan button add the following code

    //Lets get the data from the scanner, you will have Set(_Scanned,BarcodeSanner1.Value)
    Set(_Scanned,"R1,R2,R3,R4,R5,R6,R7,R8,R9,R10,R11,R12,R13,R14");
    //lets split the barcode string so we can assign it to the datacards
    ClearCollect(_ScannedArray,ForAll(Split(_Scanned,","),{Scanned: Result}))

     

    rubin_boer_0-1614840697674.png

    Above unlock the datacard above and set the default of the card as

    col1 default = First(_ScannedArray).Scanned

    Col2 = Last(FirstN(_ScannedArray,2)).Scanned

    Col3 = Last(FirstN(_ScannedArray,3)).Scanned

    Col4 = Last(FirstN(_ScannedArray,4)).Scanned

    Col5 = Last(FirstN(_ScannedArray,5)).Scanned

    Col6 = Last(_ScannedArray).Scanned

     

    On the Save button OnClick = SubmitForm(YourForm);
    NewForm(YourForm)

     

    In SharePoint

    rubin_boer_1-1614844612012.png

     

     

    That should do it for you

     

     
     
  • Larussa Profile Picture
    48 on 03 Mar 2021 at 21:47:44
    Re: Scan to a form

    Hi @rubin_boer 

    I confess that I have a lot of difficulty with this. I apologize. I need to do it in a form so that I can save this scanned information.

    What is missing for the scanned information to be inserted in the form?I did like this.

    barc1.jpg

    But the screen goes blank

    barc2.jpg

  • rubin_boer Profile Picture
    4,841 Super User 2024 Season 1 on 03 Mar 2021 at 06:56:15
    Re: Scan to a form

    Hi @Larussa i used a gallery that way i don't need to create all the text boxes. you can create a form and set the each DataCardValue to the responding Value in the collection. The form may be more work but nothing stopping you to do it that way.

     

     

     
  • Larussa Profile Picture
    48 on 02 Mar 2021 at 22:25:21
    Re: Scan to a form

    @rubin_boer 

     

    Thank you for help me

     

    I need to create a Gallery or  can you say a Form above(picture)?

     

    ...Add a Gallery and set its Items = _BarCode and its Wrap Count to 2...

  • rubin_boer Profile Picture
    4,841 Super User 2024 Season 1 on 02 Mar 2021 at 21:14:23
    Re: Scan to a form

    hi @Larussa 

     

    On the barcode scanner to a variable, for e.g.

    OnSelect = ClearCollect(_BarCode,Split(BarcodeScanner1.Value,",")) assuming your barcode reads something like "R1,R2,R3,R4,R5,R6,R7,R8,R9,R10,R11,R12,R13,R14".

     

    Add a Gallery and set its Items = _BarCode and its Wrap Count to 2.

    Add a textbox to the gallery and set the Default = ThisItem.Result

     

    This is what you will get

    rubin_boer_1-1614719678859.png

     

    Hope this helps

     
     
     
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 892 Most Valuable Professional

#2
Power Apps 1919 Profile Picture

Power Apps 1919 356

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 310 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading started
Loading complete