cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
prteotia
Microsoft
Microsoft

not able to find missing required field in canvas app form submit

I have created a canvas app in power apps, where on submit data is submitted in Sharepointlist.

The form is big and SP List contains more tha 50 columns. There are many customized validations in the form.

 

Issue is on submitting the form , I am getting error "An entry is required or has an invalid value. Please correct and try again",

I check all the validations, also removed required from SP List, still getting the error.

 

Is there any way to find out which field is creating this error?

1 ACCEPTED SOLUTION

Accepted Solutions
prteotia
Microsoft
Microsoft

Hi @PowerAddict  @v-bofeng-msft ,
Thanks for your response.


My issue is resolved , I found which was the required field. But the issue was that, it is a very big form and required is set by custom validation following certain condition check. So I was not able to find where I set that field required in the code because that field was set to invisible because of some condition.

 

If there is any way to get a report kind of thing to see all required validation set (either OOB or customized validation) in such big form then it would be helpful to resolve such issues.

     OR

 

if any way Error can return name of the field or any other information related to field that is throwing error, then it can be tracked easily in case of big forms with a lot of fields in the form

View solution in original post

6 REPLIES 6
PowerAddict
Super User
Super User

Hi @prteotia

 

Did you try removing the SharePoint list as a data source from the app and then add it again? Let me know if that helps. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Microsoft Certified Trainer MCT

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

v-bofeng-msft
Community Support
Community Support

Hi @prteotia :

Please check the datacards' Required proeprty.If they are ‘true’, then changing them to false will no longer cause an error.

vbofengmsft_0-1640744325428.png

In addition,you could replace  

SubmitForm(FormName)

with

Patch(YourSPList,Defaults(YourSPList),FormName.Updates)

this can also avoid errors (provided that you have indeed set all fields in the SP list as non-required fields)

Best Regards,

Bof

 

prteotia
Microsoft
Microsoft

Hi @PowerAddict  @v-bofeng-msft ,
Thanks for your response.


My issue is resolved , I found which was the required field. But the issue was that, it is a very big form and required is set by custom validation following certain condition check. So I was not able to find where I set that field required in the code because that field was set to invisible because of some condition.

 

If there is any way to get a report kind of thing to see all required validation set (either OOB or customized validation) in such big form then it would be helpful to resolve such issues.

     OR

 

if any way Error can return name of the field or any other information related to field that is throwing error, then it can be tracked easily in case of big forms with a lot of fields in the form

Hi @prteotia :

If it is the default form, the field in question will be prompted and marked in red. If you have done a lot of customization on the form, then I am afraid there is no convenient solution.

Best Regards,

Bof

I am having exactly the same issue in a form with many fields, some hidden conditionally. It is a total nightmare to identify the field that is causing the problem.

 

I have previously programmed using many different rapid development systems similar to Power Apps (e.g. BaaN ERP, J.D. Edwards, etc.) and they all provide a way to see and analyse the script that sits behind the graphical front-end. I wish Microsoft would do the same to Power Apps.

 

Microsoft also need to provide actionable error messages. I have had several problems in recent months that are all made worse by a Microsoft error message that contains no useable information!

Patch(YourSPList,Defaults(YourSPList),FormName.Updates)

 

worked!  Thank You!

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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