# \[Bug-2190\]Perspective 8.0.16 Dropdown

**URL:** <https://forum.inductiveautomation.com/t/bug-2190-perspective-8-0-16-dropdown/45143>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 31, 2021, 8:16pm UTC](https://forum.inductiveautomation.com/t/bug-2190-perspective-8-0-16-dropdown/45143 "2021-03-31T20:16:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jim\_lapratt](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jim\_lapratt](https://forum.inductiveautomation.com/u/jim_lapratt)\
**Post date:** [March 31, 2021, 8:16pm UTC](https://forum.inductiveautomation.com/t/bug-2190-perspective-8-0-16-dropdown/45143/1 "2021-03-31T20:16:56Z")

</div>

![DropDown](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/2/c25fc3e80178be6add87288a0dc27a12aebb87a1.png)

I can pre-populate the selected values(Green) and the user can add more. What I need is a way to protect the pre-populated ones from being removed. Can you nudge me in the right direction?

---

<div class="post-metadata">

**Author:** ![matthew.ayre](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matthew.ayre/32/19499_2.png) [@matthew.ayre](https://forum.inductiveautomation.com/u/matthew.ayre)\
**Post date:** [March 31, 2021, 8:37pm UTC](https://forum.inductiveautomation.com/t/bug-2190-perspective-8-0-16-dropdown/45143/2 "2021-03-31T20:37:22Z")

</div>

Hi @jim_lapratt, how is the binding configured and how are you allowing the user to remove the values?

Can you not put an if statement in the delete function to check for those values (and also do something similar on the add side to prevent duplicates)?

---

<div class="post-metadata">

**Author:** ![jim\_lapratt](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jim\_lapratt](https://forum.inductiveautomation.com/u/jim_lapratt)\
**Post date:** [April 1, 2021, 12:15pm UTC](https://forum.inductiveautomation.com/t/bug-2190-perspective-8-0-16-dropdown/45143/3 "2021-04-01T12:15:20Z")

</div>

Binding is standard from a dataset. Functionality is all standard dropdown. Is there a way to disallow the delete function once selected in a dropdown? I don’t see it.

---

<div class="post-metadata">

**Author:** ![matthew.ayre](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matthew.ayre/32/19499_2.png) [@matthew.ayre](https://forum.inductiveautomation.com/u/matthew.ayre)\
**Post date:** [April 1, 2021, 12:40pm UTC](https://forum.inductiveautomation.com/t/bug-2190-perspective-8-0-16-dropdown/45143/4 "2021-04-01T12:40:40Z")

</div>

@jim_lapratt, apologies I’m just trying to make sure I understand the issue correctly, but what is the binding on the props.value?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [April 1, 2021, 4:45pm UTC](https://forum.inductiveautomation.com/t/bug-2190-perspective-8-0-16-dropdown/45143/5 "2021-04-01T16:45:02Z")

</div>

I have good news and I have bad news.

Good news:  
Every `option` in `options` has a property available to it: `isDisabled`. This property is used to prevent users from interacting with the option, even though the option is still displayed in the dropdown. In theory, this would allow you to specify the options as part of the value, then make the option disabled by setting the `isDisabled` property to `true`. This setup would prevent a user from removing the selected option because it is now disabled.

(Screenshot taken in 8.1.4, though the property has existed since at least mid 8.0.X. I’ve reached out to our Documentation team to add it to the docs.)  
 ![isDisabledProperty](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/a/1ab5366b8579169998c28e2663ed42847eb878bb.png)

Bad news:  
While attempting to set this up so that I could relay a clear example and walkthrough, I found that the `isDisabled` property is currently only preventing _selection_ of a property, and is failing to prevent _de-selection_. I’ve opened a ticket to fix this issue, and so the “officially recommended” avenue won’t work as of right now.

Any current solution is going to require some logic in a property change script on the value of the dropdown.

For example:

```auto
required_values = [1002, 96, 98]
all_present = True
for _rv in required_values:
    if _rv not in currentValue.value:
        all_present = False
if all_present:
    return currentValue.value
return previousValue.value

```

Update: cleaner logic

```auto
if all(elem in currentValue.value for elem in [1002, 96, 98]):
    return currentValue.value
return previousValue.value

```
