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})

 

 


@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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PWREduCon768x460.png

Join us at PWR EduCon - A Power Platform Conference

Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!

Top Solution Authors
Top Kudoed Authors
Users online (3,005)