cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
This-n-That
Regular 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
Post Prodigy
Post Prodigy

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

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also close the item., please consider giving it 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

 

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also close the item., please consider giving it 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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (14,480)