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:
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:
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?
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
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
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.
User | Count |
---|---|
122 | |
90 | |
88 | |
75 | |
66 |
User | Count |
---|---|
220 | |
179 | |
138 | |
96 | |
73 |