# Boolean set/reset for "Enable" in perspective change script

**URL:** <https://forum.inductiveautomation.com/t/boolean-set-reset-for-enable-in-perspective-change-script/95871>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [September 11, 2024, 8:39pm UTC](https://forum.inductiveautomation.com/t/boolean-set-reset-for-enable-in-perspective-change-script/95871 "2024-09-11T20:39:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Crawford](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Ryan\_Crawford](https://forum.inductiveautomation.com/u/Ryan_Crawford)\
**Post date:** [September 11, 2024, 8:39pm UTC](https://forum.inductiveautomation.com/t/boolean-set-reset-for-enable-in-perspective-change-script/95871/1 "2024-09-11T20:39:12Z")

</div>

Good Morning,

I want to add a change script to a dropdown menu that locks the selection when certain conditions are met. I think the best way to do this is to disable the dropdown and re-enable it when a reset button is pressed.

Here’s the pseudocode for what I’m trying to achieve:

```python
If combination_valid = true, then dropdown_enable = false
Else if reset = true, then dropdown_enable = true and set to required value

```

I did have an attempt to write it but could not get it working correctly. Any help would be great. I am not sure on how to address the bit in the script e.g self.something.something...

Here is an image of the dropdowns  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/f/af4596936a35d52ac2e08da8f3e8de85676a1641.png)

Thanks,  
Ryan

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 11, 2024, 8:53pm UTC](https://forum.inductiveautomation.com/t/boolean-set-reset-for-enable-in-perspective-change-script/95871/2 "2024-09-11T20:53:52Z")

</div>

You should just be binding to the enabled prop with an expression binding. Scripts should be a last resort.

Just add your conditions, no need for an if.

Eg

```python
{view.custom.cond1} &&
{view.custom.cond2}  

```
