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

How to validate(error message) fields, when only button trigger

Hi Mates,

 

I just entered a custom message(error message to title) instead of Parent.Error, this text has to display(If empty) when the User is submitting only, but it's always displaying when entering in to screen.

 

Any assistance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@muralikrishna12 

Sorry for the delay - did I answer this question in the other post you had?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

6 REPLIES 6
Super User III
Super User III

@muralikrishna12 

An option...

In the formula for your submitForm, set the following:

UpdateContext({lclShowErrors:!yourForm.Valid});
If(yourForm.Valid, SubmitForm(yourForm))

Now, set the Visible properties of your error messages to: lclShowErrors

 

Errors will not show until someone tries to submit the form.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Hi @RandyHayes ,

Can you please understand the issue here

First, I make it Required DataCard. 

Text property of Error Message is (Default: Parent. Error) is updated with a custom message like"Required"

Visible: Defalut is Parent.DisplayMode=DisplayMode.Edit
Updated with "And(!Parent.Valid, Parent.DisplayMode=DisplayMode.Edit)"

muralikrishna12_0-1609925492514.png

Now when I enter this form its shows a custom message, it should not display until press the button.

It should display if it is empty during submittion.

 

 

@RandyHayes 

Where do I need to Set the following on Form if yes under what property (Visible, OnSuccess, etc)
If Screen what property (OnVisible) etc

UpdateConte

 

UpdateContext({lclShowErrors:!yourForm.Valid});
If(yourForm.Valid, SubmitForm(yourForm))

 

 In this case, where can I enter my custom text Like ("Field is Required") to lclShowErrors so that it will display if the form is not valid  

Please explain a bit clearly 

Hi,

 

Could you please set Error Control Text Property like this : If(!IsBlank(Parent.Error),"Required",Blank())

Super User III
Super User III

@muralikrishna12 

Sorry for the delay - did I answer this question in the other post you had?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Hi @RandyHayes ,

Yes, you are right,

The same resolution I got from one of my friends, but in fact, both are the same.
Expecting in future Reply clearly like on-screen of On Visible property update/Set etc.. so that will clearly will clear to every one.

Appreciated your Fix.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (63,144)