cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LuisTorres
Helper II
Helper II

How to manually add errors to the errors table?

How can I add errors manually to the errors table?

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-errors

 

Is there an easy / recommended way of doing this?

1 ACCEPTED SOLUTION

Accepted Solutions
LuisTorres
Helper II
Helper II

Errors table is just like any other collection, so this worked:

Collect(Errors('MySource'),{Column: "Col1",Message:"field is required",Error:2})

 

 

View solution in original post

3 REPLIES 3
LuisTorres
Helper II
Helper II

Errors table is just like any other collection, so this worked:

Collect(Errors('MySource'),{Column: "Col1",Message:"field is required",Error:2})

 

 

View solution in original post


@LuisTorres wrote:

Errors table is just like any other collection, so this worked:

Collect(Errors('MySource'),{Column: "Col1",Message:"field is required",Error:2})

 

 


Hi @LuisTorres 

Is ('MySource') is the collection name?
Is this part: Message:"field is required",Error:2 is hard coded?


What i need to understand is, can we really capture the error message generated from power app into a collection?

Thanks,

pytbyt

Errors('MySource') is prepopulated when you do a patch and there are errors, however you can manually add errors to it if you know what the rows have.

Helpful resources

Announcements
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,867)