# Partially Disable Multistate Button

**URL:** <https://forum.inductiveautomation.com/t/partially-disable-multistate-button/96725>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [October 2, 2024, 6:05pm UTC](https://forum.inductiveautomation.com/t/partially-disable-multistate-button/96725 "2024-10-02T18:05:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [October 2, 2024, 6:05pm UTC](https://forum.inductiveautomation.com/t/partially-disable-multistate-button/96725/1 "2024-10-02T18:05:17Z")

</div>

Can I partially disable a multistate button?

For instance I normally want this multistate button to assign a value of 0, 1, or 2 but there are instances where I want to disable the 2 option.

Is that possible, or will I need to come up with a custom solution?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 2, 2024, 6:07pm UTC](https://forum.inductiveautomation.com/t/partially-disable-multistate-button/96725/2 "2024-10-02T18:07:21Z")

</div>

Plan on something custom, as you likely will have to handle the case where an option is forbidden by conditions _after_ it is already chosen, or even in use.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [October 2, 2024, 6:30pm UTC](https://forum.inductiveautomation.com/t/partially-disable-multistate-button/96725/3 "2024-10-02T18:30:12Z")

</div>

True. I'll probably have to do a property change script and just force it back to the previous value when "disabled"

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [October 2, 2024, 8:33pm UTC](https://forum.inductiveautomation.com/t/partially-disable-multistate-button/96725/4 "2024-10-02T20:33:32Z")

</div>

```python
if event.propertyName == 'controlValue':
	if event.newValue == 2:
		if event.source.parent.parent.getComponent('eqTypeCheck').disable:
			event.source.controlValue = event.oldValue

```

Getting a "can't coerce None to int" error on line 4. Not sure why.

Edit:  
I have the indicator bound to the control value, so if I use

```python
if event.propertyName == 'indicatorValue':
	if event.newValue == 2:
		if event.source.parent.parent.getComponent('eqTypeCheck').disable:
			event.source.controlValue = event.oldValue

```

It then works without the error
