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 / Problems with NewForm
Power Apps
Answered

Problems with NewForm

(0) ShareShare
ReportReport
Posted on by 25

Hi, I'm working on a barcode scanner application to keep track of parcels. The tracking info is recorded on a Sharepoint site with two custom columns: Barcode (255 char text) and Courier (10 Choices).

 

My application has a Form with 3 Card fields. Two of which contains the custom field columns Barcode (text input), Courier (dropdown). The third Card field is a button that calls SubmitForm() to create a new entry on the sharepoint list and reset the form by NewForm(). The issue is that the form takes too long to reset, and I'm unable to scan multiple barcodes in quick succession. I end up appending the new barcode to the previous entry because the barcode text field does not clear quickly enough. Sometimes it would say that the field is blank. 

 

I'm wondering if there was a better way to create a NewForm after a Submit? 

 

Any help would be appreciated.

 

Button control - OnSelect:

 

 

SubmitForm(Form1);

 

 

Form control - OnSuccess:

 

 

NewForm(Form1);SetFocus(BarcodeTxtField);Set(currentCounter, currentCounter+1);

 

 

DefaultMode:

 

 

FormMode.New

 

 

BarcodeTxtField - OnChange:

 

 

Select(Button1);

 

 

Categories:
I have the same question (0)
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Remove everything except for the focus part of the code. and set

     

    Button OnClick:

    SubmitForm(Form1);

    Form OnSuccess

    NewForm(Form1);

     

    To many operations on your code.

  • rethc Profile Picture
    25 on at

    Thank you for your suggestion. I've tried it and it's improved a little, but it's still not resetting quickly enough.

     

    Do you know if theres a way to select the textfield so i can just write over the previous barcode?

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    If you need multiple entries together instead of forms try gallery. I am sharing a video of @RezaDorrani . Although it's for many columns you can get the concept and tweak it according to your need.

    https://www.youtube.com/watch?v=8I0Pt_8I6k8

  • Ram Prakash Duraisamy Profile Picture
    5,877 Super User 2026 Season 1 on at

    Hello @rethc,

     

    For Scanning Multiple Bar Code you can try this simple solution

     

    On App Start:

     

    rampprakash_0-1632227769015.png

    ClearCollect(getMultipleScannedValues,Blank());

     

    Then Add a Empty Gallery and Set getMultipleScannedValues as DataSource and Insert a Text value in the gallery items

     

    then in onScan

    if(

    Collect(getMultipleScannedValues,BarcodeScanner1.Value)

    rampprakash_1-1632227835718.png

    Collect Multiple Values

     

    then Create a button called Submit

    ForAll(getMultipleScannedValues,Patch(TESTDEMO,Defaults(TESTDEMO),{ENTITYTYPE:Value}))

    rampprakash_2-1632228067426.png

     

    Thats it.

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

  • rethc Profile Picture
    25 on at

    Hi @rampprakash, sorry i should've been more clear but this is for a desktop application. We are using a USB barcode scanner

     

  • Verified answer
    Ram Prakash Duraisamy Profile Picture
    5,877 Super User 2026 Season 1 on at

    Hello @rethc,

     

    You can find a cool video https://youtu.be/XFfr1GDCiFE 

     

    Please mark as Answer if it is helpful and provide Kudos

     

     

    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA

    Blog : https://microsoftcrmtechie.blogspot.com

  • rethc Profile Picture
    25 on at

    Thank you - it works 🙂

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard