Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

How to display form errors - Currently no text!

I am struggling to use the built in error handling aspects of powerapps when submitting an item or modification to a sharepoint list.


My submission/update process is made up of a number of screens and forms. The commit is made on the last form (frmAssesment) using the following command:


If(frmDescription.Mode=New,Patch('System Inventory',Defaults('System Inventory'),frmDescription.Updates,frmHardware.Updates,frmOpSystem.Updates,frmWarranty.Updates,frmAssesment.Updates),....


On this form, I am INTENTIONALLY leaving mandatory fields BLANK so I generate errors. 


When viewing the form in the developer screen, I get a little yellow triangle with ! in it... and the message when I hover over reads "Field name:Field Required".


BUT... NONE of the data card errormessage text boxes get populated. Text=Parent.Error


I created a custom label (lblError) and set text to be frmAssesment.error as advised in the various exampels and tutorials.. and that stays blanks. BUT... the error exists, because lblError is made visible if(isempty(frmAssesment.error),false,true). This works fine!


To confirm that something was happening, I expanded the lblError.text code to read frmAssesment.ErrorKind &" "& First(Errors('System Inventory',frmAssesment.Updates)).Message and frmAssesment.ErrorKind &" "& frmAssesment.error and all that gets me is "0 "


I have even set the onfailure property of frmassesment to navigate to itself!


I was lead to believe that the patch command would enable me to extract/identify errors before the item was submitted to the sharepoint list.


Any guidance would be appreciated. I need to demonstrate this process ASAP. I work in an environment where data validation is important and process qualification is detailed. So error handling, and preventing idiots from doing the wrong this is important!

Community Support
Community Support

Hi adstar22,


When using Patch function to create a new record, we are asked to specify a column name then the value to be updated.

The function might be configured looks like:
Patch( IceCream, Defaults( IceCream ), { Flavor: “Strawberry” } )

Please check this documentation about Patch for more details. I would suggest you check the Patch function configuration on your side.


We can use error function to provide error information for previous change to a data source. Please refer to the documentation about Errors function for a reference:



Best regards,
Mabel Mao

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

Hi, I'm not sure whether I have explained my issues clearly, as the patch command I am using is being questioned.

The patch methodology and command I am using is working absolutely fine... I am able to create new items, and update existing items, in a single action across multiple forms. It is actually a really neat piece of code which you guys helped me with!


The problem I have, is that if i deliberately leave out some mandatory fields.. an error exists... but I cant display it!


I know the error exists, because I have got the yellow triangle, and with the following command I get a "0" displayed:


lblerror.text=frmAssesment.ErrorKind &" "& frmAssesment.error


The problems are:

1) why don't any of the data cards, which all have "ErrorMessage" labels with the formula ErrorMessage21.text=Parent.error

2) why does the form.error not contain any text?

3) in the developer studio area, the yellow triangle identifies the field(s) which have an error... so the message exists.. why cant I see it/use it?!

Frequent Visitor

 You probably need to set up the datasource with the Errors() function in order to catch or display errors whenever they occur on the DS.


Consult the documentation for more information about the Function.


The Patch function and other data functions don't directly return errors. Instead they return the result of their operation. After a data function executes, you can use the Errors function to obtain the details of any errors. You can check for the existence of errors with the [IsEmpty] function in the formula IsEmpty( Errors ( ... ) ).

You can avoid some errors before they happen by using the Validate and DataSourceInfo functions. See working with data sources for more suggestions on how to work with and avoid errors.

Errors Function

i don't think the patch function does any validation like the submit function does. there is a validate function that you can call from you script to validate the data.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,225)