cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
This-n-That
Frequent Visitor

Need to Customize Error Notifications

I am taking over development of an app that has error notifications on final submit. These appear as bars across the top of the screen. I found this article from Microsoft explaining the error notifications. It appears that notifications should be attached to the OnSelect feature of a button. However, this code is not in the OnSelect button in the app. There is only a patch back to the underlying SharePoint list:

Patch(LIST,Defaults(LIST),'Home-Form1'.Updates,'Home-Form2'.Updates,'PA-Form'.Updates,'O-Form'.Updates,'EndShift-Form'.Updates,'Attachments-Form'.Updates,'Acknowledgement-Form'.Updates);Navigate(Complete,ScreenTransition.Fade)

When I click the final submit button, I get the error message below:

Missing Field Error Message.png

My question is whether error notifications like this one can be launched from elsewhere in an app. This message is useless and I would like to customize it, but I don't know how to get to it if the code isn't on the final submit button.

To further complicate matters, I cannot find the field mentioned in the error message above. This field is required, but I cannot find it when I search:

no match found.PNG

There is no field by this name in the underlying SharePoint list and I have refreshed the data sources. Has anyone ever heard of this happening? Phantom required fields?

4 REPLIES 4
Ramole
Memorable Member
Memorable Member

Hi @This-n-That 

 

The OData_ field is system name, it could be different name you have in you your data source.
What is your Data source, SharePoint ?

 

SharePoint you can untick  if its not required and refresh you data source in PowerApps 

 

Check in setting if there's an item tick required see the screenshot 

 

Screenshot 2020-12-29 183652.pngScreenshot 2020-12-29 183615.pngScreenshot 2020-12-29 183411.png

 

Thank you
If this post helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."

I just went through and did all that and I still get the error. And where do I customize the error notification anyway? If the code isn't attached to the submit button, how is it being generated?

Hi @This-n-That 

Just delete the form and re attach and see if you get the error again, if you done that and still error double check what is the code of the submit button or replace with this ,  SubmitForm(your form name )  

 

If you're using patch function this how you do it 

 

 Patch(
            'you data source',
            Defaults(you data source),
            {
                Business_x0020_Name: txtinpBusinessName.Text,
                Type_x0020_of_x0020_Check: cmbTypeCheck.Selected,
                Invoice_x0020_Number: txtinpCheckInvoice.Text,
                Date_x0020_due: datepkCheckDueDate.SelectedDate,
                Check_x0020_Number: txtinpCheckNumber.Text,
                amount: Value(txtinpCheckAmount.Text),
                Status: cmbstatusCheck.Selected,
                note: txtinpCheckNotes.Text
            },
            FormChecks.Updates
        )
    );;Navigate(Complete,ScreenTransition.Fade)

 

Please replace the name with your control names from SharePoint, if you dont know how to check the correct control name let me know 

 

 

All the best

 

 

 

Thank you
If this post helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."
WarrenBelz
Super User III
Super User III

Hi @This-n-That ,

You cannot customize that message itself, but you could use an IfError message after each card Patch to see where the issue is.

However this is a debugging exercise and not something you want to tell the user, so maybe firstly try the forms one at a time to see where the error may be (although it could be all of them if as they are the same data source, but it is worth the exercise in case you have a corruption on a form). There is nothing wrong with your code that I can see.

Patch(
   LIST,
   Defaults(LIST),
   'Home-Form1'.Updates,
   'Home-Form2'.Updates,
   'PA-Form'.Updates,
   'O-Form'.Updates,
   'EndShift-Form'.Updates,
   'Attachments-Form'.Updates,
   'Acknowledgement-Form'.Updates
);
Navigate(
   Complete,
   ScreenTransition.Fade
)

You have already confirmed you have no compulsory fields and nothing named OData_2AC1 (which would be strange anyway).

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,654)