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 III
Super User III

@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 III
Super User III

@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 III
Super User III

@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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,558)