cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JenVitug
Kudo Commander
Kudo Commander

PowerApps Form RESETS my fields before Submitting only when the fields are mandatory

My PowerApps submits the New form and adds the item to the SharePoint list if all my fields are not mandatory. but once i start  making some of the fields mandatory (required=Yes in column settings in Sharepoint)  , my powerApps form cannot submit the form (cannot add new item)  anymore, it keeps on showing the error "field required".   It is somehow resets the inputs to the form only when the are mandatory ?  What is happening ?  

 

 

4 REPLIES 4
v-micsh-msft
Community Support
Community Support

Hi @JenVitug,

 

If you make the field as required in SharePoint list, then you must provide a value for the corresponding field in the form control under PowerApps.

If the field is left with blank, PowerApps would then provide the error message.

Edit form and Display form controls in PowerApps

Refer to the save changes part.

Quoted:

"

When the SubmitForm function runs, it first validates the data that user wants to submit. If a required field doesn't contain a value or another value doesn't conform to some other constraint, the ErrorKind properties are set, and the OnFailure formula runs. 

"

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, 

Of course  when  i made the fields mandatory, i provided inputs to these fields, but they are GETTING RESET when i click the SUBMIT button, hence the ERROR.  

But when i removed the MANDATORY property in SharePoint  for these  columns, the inputs i provided in the same EDITFORM gets submitted successfully .  

Hi, 

Of course  when  i made the fields mandatory, i provided inputs to these fields, but they are GETTING RESET when i click the SUBMIT button, hence the ERROR.  

But when i removed the MANDATORY property in SharePoint  for these  columns, the inputs i provided in the same EDITFORM gets submitted successfully .  

 

Anyway, i have added a condition in  for the SubmitButton.OnSelect  such that it checks for IsBlank for all the mandatory fields and generate a customized error message.  this is the workaround i  have used for now.

Anonymous
Not applicable

What I found was that if you have another mandatory field in the list and is hidden in the edit form then it seems to give that error and reset the form. I have taken the mandatory property of the hidden field and it works.

 

Hope this helps

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,974)