Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Why i can not submit the same form twice

(0) ShareShare
ReportReport
Posted on by 3,502

I have a form, and a button, now when i click on submit >> i want the user to have the ability to resubmit again>> but currently when the user submits the form for the first time it will be saved successfully>> but when the user clicks on the submit button again>> the form submission will fail with the following message "An entry is required or has an invalid value. please correct and try again'"

 

here is my form:-

 

 

submit.png

 

any advice?

 

  • BCLS776 Profile Picture
    BCLS776 8,988 on at
    Re: Why i can not submit the same form twice

    I've noticed several other things that may be causing an issue:

    • The OnSuccess calls ResetForm and then NewForm; only NewForm is required
    • There is a different form referenced than used with your Submit button (RegistrationForm_1 vs RegistrationForm_2)
    • The trainNumber variable is being set at this point - is this the intended behavior? If that card is part of your form, it is being cleared/defaulted prior to this Set and may not have the value you expect

    Any of these things could contribute to the errors you are seeing

  • johnjohn123 Profile Picture
    johnjohn123 3,502 on at
    Re: Why i can not submit the same form twice

    @BCLS776  ok inside the form OnSuccess i added this :-

     

    insucc.png

     

    but did not solve the issue.

     

    also i checked that all the fields inside the form has values

  • BCLS776 Profile Picture
    BCLS776 8,988 on at
    Re: Why i can not submit the same form twice

    @johnjohn123 wrote:

    @BCLS776but currently after submitting the form i will stay on the same form .. buy if i click on submit i will get this error "An entry is required or has an invalid value. please correct and try again'"


    This error indicates a problem I described in point #2 above: The appropriate Default/Update properties for each card on the form need to be populated with valid data. The form will not submit successfully unless it has all required fields filled out for the new record.

  • johnjohn123 Profile Picture
    johnjohn123 3,502 on at
    Re: Why i can not submit the same form twice

    @BCLS776but currently after submitting the form i will stay on the same form .. buy if i click on submit i will get this error "An entry is required or has an invalid value. please correct and try again'"

  • BCLS776 Profile Picture
    BCLS776 8,988 on at
    Re: Why i can not submit the same form twice

    OK, can you tell us where your app calls NewForm() so we can verify that is working correctly? It doesn't appear in the OnSelect property of the Submit button, so it must be somewhere else.

    Also, please open a Monitor session before you test the app next, so we can verify the actions of the app.

  • johnjohn123 Profile Picture
    johnjohn123 3,502 on at
    Re: Why i can not submit the same form twice

    @BCLS776yes you are right

  • BCLS776 Profile Picture
    BCLS776 8,988 on at
    Re: Why i can not submit the same form twice

    @johnjohn123 wrote:

    @BCLS776  yes this is already there,, but what do you exactly mean by "to submit a second record of data"?


    My understanding so far is that you wanted to submit the form a second time, resulting in a second record in your data source - are you after something different than that?

  • johnjohn123 Profile Picture
    johnjohn123 3,502 on at
    Re: Why i can not submit the same form twice

    @BCLS776  yes this is already there,, but what do you exactly mean by "to submit a second record of data"?

  • BCLS776 Profile Picture
    BCLS776 8,988 on at
    Re: Why i can not submit the same form twice

    To get a form to submit a second record of data, you'll need to have two things working:

    1. The form needs to be in FormMode.New (usually done by calling NewForm)
    2. The appropriate Default/Update properties for each card on the form need to be populated with valid data

    Do you know if that is the case with your app?

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard