Hello together,
I am relatively new here... I am looking for a way to set the control boxes so that when one is activated, the other can not be activated, that is, that only "YES" or only "NO" can be checked, not both. How can this be set? (See picture)
I am grateful for any help.
Best regards
Solved! Go to Solution.
Hi @PowerSäm ,
1\ Add a check box control 'Checkbox1' and set its Default property to:
false
Set 'Checkbox1' 's OnCheck property to:
Reset(Checkbox2)
2\ Add a check box control 'Checkbox2' and set its Default property to:
false
Set 'Checkbox2' 's OnCheck property to:
Reset(Checkbox1)
3\ The result is as follows:
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Hi PowerSäm,
it depends what behaviour you want your application to have. Would you prefer if the checkbox was clickable but automatically removed the check on the other checkbox, or rather that you can't check it.
Either way you could put checks on the OnCheck/OnUncheck actions.
For example if you want it to be uncheckable; in both checkboxes' OnCheck:
If(otherCheckbox.Value, false, true)
and if you want it to take override the other checkbox I think you'll need a variable to keep track for example something like
in the screen OnVisible you Set(varCheckboxOn1, false); Set(varCheckboxOn2, false);
checkbox1 Default: varCheckboxOn1
checkbox2 Default: varCheckboxOn2
and then on the OnCheck and OnUncheck action in both checkboxes you can adjust them however you want
Hope this helps
Hi @PowerSäm ,
1\ Add a check box control 'Checkbox1' and set its Default property to:
false
Set 'Checkbox1' 's OnCheck property to:
Reset(Checkbox2)
2\ Add a check box control 'Checkbox2' and set its Default property to:
false
Set 'Checkbox2' 's OnCheck property to:
Reset(Checkbox1)
3\ The result is as follows:
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
278 | |
241 | |
83 | |
38 | |
35 |
User | Count |
---|---|
358 | |
241 | |
128 | |
72 | |
49 |