# Logic for mutually-exclusive checkboxes?

**URL:** <https://forum.inductiveautomation.com/t/logic-for-mutually-exclusive-checkboxes/64336>\
**Category:** Ignition\
**Tags:** ignition79, scripting\
**Created:** [September 21, 2022, 3:46pm UTC](https://forum.inductiveautomation.com/t/logic-for-mutually-exclusive-checkboxes/64336 "2022-09-21T15:46:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SOPerator](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@SOPerator](https://forum.inductiveautomation.com/u/SOPerator)\
**Post date:** [September 21, 2022, 3:46pm UTC](https://forum.inductiveautomation.com/t/logic-for-mutually-exclusive-checkboxes/64336/1 "2022-09-21T15:46:43Z")

</div>

I have several checkboxes that I want to use, and if one checkbox has a selected value of True, I want the other ones to all be false.

The current logic I have is this, on propertychange:

```auto
'Logic for first checkbox
if (event.source.parent.getComponent('2ndChk').selected == True):
	event.source.parent.getComponent('2ndChk').selected=False

'Logic for second checkbox
if (event.source.parent.getComponent('1stChk').selected == True):
	event.source.parent.getComponent('1stChk').selected=False

```

I’m thinking I should be using the newValue features, but I haven’t been able to actually access them

---

<div class="post-metadata">

**Author:** ![djs](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@djs](https://forum.inductiveautomation.com/u/djs)\
**Post date:** [September 21, 2022, 3:51pm UTC](https://forum.inductiveautomation.com/t/logic-for-mutually-exclusive-checkboxes/64336/2 "2022-09-21T15:51:11Z")

</div>

This seems like a job for a [Radio Button](https://docs.inductiveautomation.com/display/DOC80/Vision+-+Radio+Button). Groups of radio buttons are designed to be mutually exclusive by default.
