Solved! Go to Solution.
Hi @Berihun1 ,
I assume you are referring to the red labels under the text controls. You need Variable here - firstly initiate it at screen OnVisible
UpdateContext({varError: false})
Now on your Save button OnSelect put this
If(
Value(YourAgeBoxName.Text) > 0 && Value(YourFamilySizeBoxName.Text) > 0,
UpdateContext({varError: false});
SubmitForm(YourFormName),
UpdateContext({varError: true})
)
The last bit is the Visible on your error labels
varError && !(Value(Self.Text) > 0)
I am assuming here that a number must be entered. Also (if you have not already) set the format to Number
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.
Visit my blog Practical Power Apps
Can you try
If(IsBlank(labelAge),Notify("Please enter the value, reason",NotificationType.Error))
Hi @Berihun1 ,
I assume you are referring to the red labels under the text controls. You need Variable here - firstly initiate it at screen OnVisible
UpdateContext({varError: false})
Now on your Save button OnSelect put this
If(
Value(YourAgeBoxName.Text) > 0 && Value(YourFamilySizeBoxName.Text) > 0,
UpdateContext({varError: false});
SubmitForm(YourFormName),
UpdateContext({varError: true})
)
The last bit is the Visible on your error labels
varError && !(Value(Self.Text) > 0)
I am assuming here that a number must be entered. Also (if you have not already) set the format to Number
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.
Visit my blog Practical Power Apps
t
hank you but where do I initiate variables? you mean from the error message visible property?
Exactly as per the code I posted.
thank you i got
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
190 | |
52 | |
51 | |
36 | |
33 |
User | Count |
---|---|
268 | |
97 | |
83 | |
68 | |
68 |