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.
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.
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

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.
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
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!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,476)