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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / New Item Form resets b...
Power Apps
Unanswered

New Item Form resets before submitting

(0) ShareShare
ReportReport
Posted on by

Have been following instructions on how to create an app from scratch. I've created a screen with an Edit form in it which will be used to submit a new item to a SharePoint List. From the home screen, there is a button which takes you there OnSelect:

NewForm(CreateNewClaimForm);Navigate(CreateNewClaim, ScreenTransition.Fade)

Right now, I've just set one field ("Employee ID") as required. To submit the form, I've created a button with the following OnSelect:

SubmitForm(CreateNewClaimForm)

It was working fine initially. However, after adding some default values for some fields (e.g. current user's Manager, user email, etc), the form now appears to reset the input field of the required field before submitting when i click the submit button, throwing an error.

 

Capture2.PNG

 

Capture.PNG

 

 

 

I can't find any information on this on other forum posts. I'm working inside of PowerApps studio where it's a little tricky to debug exactly what is going on behind the scenes. Am I missing something here?

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    Done a little more testing and it appears just the "Manager" field causes this issue.

     

    This is what I've set as the "Default" parameter for it:

    Office365Users.Manager(Office365Users.MyProfile().Id)

     

    If I set it back to "Parent.Default" the form will submit just fine... Any clues what's happening here?

  • Verified answer
    Meneghino Profile Picture
    6,949 on at

    Hi @Anonymous, you could check the Reset property of the controls in the form to see if it is somehow triggered by the submit.

    Or the reset property of the form, if such exists.

     

    However in my personal opinion, you are much better off not using forms if you need to do any customisation.  I have always found it easier in the end to just create the single controls as needed and then use the Patch function for any new records or editing of existing records.  Please let me know if you have any specific questions on this.

  • Community Power Platform Member Profile Picture
    on at

    Thanks for the suggestion @Meneghino, I'll look at building a custom form using individual elements instead. 

     

    It seems other people are having the same issue, I guess building your own form will have to suffice as a workaround for the time being.

  • Meneghino Profile Picture
    6,949 on at

    You are welcome @Anonymous

    Please see the following post for a formless SharePoint solution:

    https://powerusers.microsoft.com/t5/PowerApps-Forum/Timeslot-Registation-Form/m-p/23530

  • ohthreesixfive Profile Picture
    25 on at

    In case anyone stumbles across this (admittedly very old thread) in the future - my gut feeling is that the reason you were getting an error is because the Schema that the Person/Group field looks for is different than the one you are providing.

     

    In this case, since it doesn't match it just leaves it blank (which gives the appearance of it resetting, when it actually isn't).

     

    To solve this, the following would likely suffice for this specific case.

     

    Default for the 'Manager' column would be:

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims:"i:0#.f|membership|" & Office365Users.Manager(Office365Users.MyProfile().Id).Mail,
     Department:"",
     DisplayName:Office365Users.Manager(Office365Users.MyProfile().Id).DisplayName,
     Email:Office365Users.Manager(Office365Users.MyProfile().Id).Mail,
     JobTitle:"",
     Picture:""
     }

     

    Full Disclosure: I've not yet been able to test this myself - but I've dealt with (and am currently dealing with) plenty of these SharePoint Custom Form quirks to know that you won't always get an error message for some of these things.

     

    Cheers,

     

    Ramiro

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard