cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ashokpershad
Kudo Kingpin
Kudo Kingpin

Error Handling using Patch Function

ashokpershad_0-1635936604341.png

 

This error coming after i press the Patch submit button. Before pressing button this error is not showing in formula section.

Everything seems fine but still not resolved.

For details about this issue kindly follow this link:

Patch Dataverse Table with Lookup Columns from Collection 

Thanks

5 REPLIES 5
CarlosFigueira
Power Apps
Power Apps

Assuming that you have the 'Formula-level error management' feature enabled in your app, you can wrap your Patch in an IfError expression as shown below, which will give you additional details about the failure. You can then use the Trace function to log the error, and use the Monitor to look at the trace and see more details on what is going wrong with the Patch.

IfError(Patch(Manhours, Defaults(Manhours), {WOrder:glrySWO_1.Text, ...}), Trace("Patch error", TraceSeverity.Warning, { errors: AllErrors }))

Hope this helps!

@CarlosFigueira 

I tried same as you suggested but still there are no extra details available. Please have a look at the screenshots.

Also, in 2nd screenshot error seems to be some expected types as "%" but I am not using that kind of field anywhere in my tables. 

 

ashokpershad_1-1636521877852.png

 

 

ashokpershad_0-1636521843523.png

 

CarlosFigueira
Power Apps
Power Apps

We currently have a bug in the Trace function where it is having some problems with serializing records that have enum properties (like the error). I'm fixing it now, but it should be a few weeks before it reaches production. Meanwhile, can you replace the expression with this (wrapping the AllErrors in the JSON function):

IfError(Patch(Manhours, Defaults(Manhours), {WOrder:glrySWO_1.Text, ...}), Trace("Patch error", TraceSeverity.Warning, { errors: JSON(AllErrors) }))

Thanks!

@CarlosFigueira 

I did that. How is it going to help?

Sametime please note that due to this error even the data is not patching in my data source.

Hi @ashokpershad that would show more details about the error in the "details" pane in the monitor (which may not be the case with the previous bug).

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (2,240)