cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GarryPope
Impactful Individual
Impactful Individual

Parent Error not showing on form datacard

Hello Power Apps Community... and hopefully @RandyHayes if possible.


Hello Randy, 

I hope you're well. I used your Forms video on YouTube, which as I said before is the best, but I'm facing a different challenge at the moment which I hope you could help with please. 


I'm using Dataverse for Teams.
I have a form with many datacards.

Three data cards I've added custom errors, but the rest I want to use the validation errors from the database.

I have a icon that let's me edit or save the form.

I've put some validation on the save icon DisplayMode which is the below:

If(
    (frmMetrics.Mode = FormMode.View || (frmMetrics.Valid && frmMetrics.Unsaved)) And !crdErrorIncidentTime.Visible And !crdErrorResponseTime.Visible And !crdErrorRequest.Visible,
    Edit,
    Disabled
)

 

This works great, but what I'm seeing is, if one of my datacards, which doesn't have a custom error on it, does not have the correct data input, example, a column's maximum value is 5, so I can only put from 0 to 5, it never throws an error.

 

This is because, I believe, the error only fires when I try and save the form to the database. As I'm disabling the save icon, as per formula above, the user can never click the icon and try and save it to the database to receive the error.

 

So my question is, any ideas how to get the database errors to show immediately rather than having to enable the save icon to allow them to save the record? I really don't want to have to add a custom error message on each data card if possible.

 

Thanks very much,

Garry

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@GarryPope 

 

Yes, the errors from the datasource (such as the max value, etc.) do not reveal themselves until the form is submitted (attempted).

 

To get what you are looking for prior to submit, you would need to expose the validation formula as you have done for the other columns.  Unfortunately, a lot of the datasourceinfo values are not validated until submit.

 

However, you can at least utilize the Validate function in the form datacards to detect if values entered are valid.  If not, then your current process for checking the visibility of error indicators would then work fine.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@GarryPope 

 

Yes, the errors from the datasource (such as the max value, etc.) do not reveal themselves until the form is submitted (attempted).

 

To get what you are looking for prior to submit, you would need to expose the validation formula as you have done for the other columns.  Unfortunately, a lot of the datasourceinfo values are not validated until submit.

 

However, you can at least utilize the Validate function in the form datacards to detect if values entered are valid.  If not, then your current process for checking the visibility of error indicators would then work fine.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
GarryPope
Impactful Individual
Impactful Individual

Hello @RandyHayes,

 

You're the best. Thanks so much!

 

Garry 

RandyHayes
Super User
Super User

@GarryPope 

Happy to help!! 🙂

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,129)