Hi i am working on the form where if i make checkbox requried field it does not throw submission error while submitting data in powerapps , even the field is mandatory it work for text box and drodown but not for checkbox
Solved! Go to Solution.
Hi @Ashok2 ,
The easiest way is to do a check on your Save button and give a message. I will call the CheckBox Check1 and your form MyForm
If(
Check1.Value = true,
SubmitForm(MyForm),
Notify("you must check the box", NotificationType.Error)
)
This will put a red message across the top of the screen instead of saving the form.
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.
The thing is how do you define a checkbox being mandatory? If it is unchecked, it could be by choice. There are only two possible outcomes with a checkbox (checked or unchecked) and we cannot say unchecked equates to user not providing a value, as not checking it is a perfectly viable option. If for you, required equates to the user checking the checkbox, you can add some logic to it. Let me know if that is your use case and I can provide more details.
Does that help?
---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.
Thanks!
Hardit Bhatia
https://thepoweraddict.com
Hi @Ashok2 ,
The easiest way is to do a check on your Save button and give a message. I will call the CheckBox Check1 and your form MyForm
If(
Check1.Value = true,
SubmitForm(MyForm),
Notify("you must check the box", NotificationType.Error)
)
This will put a red message across the top of the screen instead of saving the form.
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.
Hi @PowerAddict ,
That is why I made my logic as having to be true to proceed. I assumed that @Ashok2 wanted the user to check a box acknowledging something before saving.
Yes its correct if checkbox is not checked it passing the value no which will lead to incorrect information so i changed the behaviour to dropdown which reslove my issue thanks all for your responses
Hi @Ashok2 ,
If you are wanting an error with no value or false, then the test I did (unless it is true, do not save it but give a message will work.
I am trying to diable a button if a checkbox is unchecked. But for some reason Checkox.value=true, .value is being underlined in red. I tried to reproduce, it works the first time and if I edit the formula it starts undying .value.
User | Count |
---|---|
258 | |
111 | |
95 | |
48 | |
41 |