So basically I want to make a field visible when a field is empty. The following code is inside of my button at OnSelect:
If(IsBlank(DataCardValue22.Text); UpdateContext({VarError:true})
Now on the Visible of my errormessage label I have this:
VarError
But this gives me an error. What am I doing wrong?
Solved! Go to Solution.
Okay now I understood
If(IsBlank(DataCardValue22.Text), UpdateContext({VarError:true}),UpdateContext({VarError:false}) )
give like this
In screen on visible property add code as
UpdateContext({VarError:false})
@Anonymous
Can you please supply a screenshot of the error message you are receiving in the Visible of your errormessage label?
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
I get this error message:
https://gyazo.com/a43f37a69c66e55f2b685e99fdf1d9f1
@mdevaney
Anyone knows a fix?
If(IsBlank(DataCardValue22.Text); UpdateContext({VarError:true})
Yes, your code should be like this
If(IsBlank(DataCardValue22.Text), UpdateContext({VarError:true}) )
But this VarError variable will get value only when you click that data card so it's better to write your condition in error message 14 label visible property add code as IsBlank(DataCardValue22.Text)
In error message Add some text to check whether it shows message when that data card value is empty
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Sorry, I did not explain what I wanted in my application. I do not want the error message to be always visible if that datacard is empty. I only want it to give the error when they click on the "Submit" button of the form. That's why I've used that code.
@SumanKoduri
Okay now I understood
If(IsBlank(DataCardValue22.Text), UpdateContext({VarError:true}),UpdateContext({VarError:false}) )
give like this
In screen on visible property add code as
UpdateContext({VarError:false})
Is it fixed or you have any issue still
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
All good! Thanks so much!
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
195 | |
67 | |
46 | |
41 | |
28 |
User | Count |
---|---|
254 | |
119 | |
86 | |
84 | |
83 |