# Multiple Selection Dropdown

**URL:** <https://forum.inductiveautomation.com/t/multiple-selection-dropdown/73726>\
**Category:** Ignition\
**Tags:** perspective, ignition81, scripting, database\
**Created:** [May 15, 2023, 2:55pm UTC](https://forum.inductiveautomation.com/t/multiple-selection-dropdown/73726 "2023-05-15T14:55:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Potvin](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Alexandre\_Potvin](https://forum.inductiveautomation.com/u/Alexandre_Potvin)\
**Post date:** [May 15, 2023, 2:55pm UTC](https://forum.inductiveautomation.com/t/multiple-selection-dropdown/73726/1 "2023-05-15T14:55:31Z")

</div>

Hi all,

I would like to know which direction would be the easiest. I want to use multiple dropdown lists to assign operators to different machines for each shift. I have a SQL list that I can query with all the operators and their usual shifts. When you select one data in a multiple dropdown list, it is no longer available, which is great. I would like to show only the operators that have not been selected on other machines in all the dropdown lists.

For example, if Machine\_1 has Alex working on it, when I open the dropdown for Machine\_2, Alex should not be available anymore.

I thought of using a WHERE clause in my SQL query to exclude all operators that are selected in the other dropdown lists, but that would mean I would have to create 50 inputs for each dropdown. So, I would like to know if someone knows an easier way i just started so you think i should change my structure let me know.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/7/1775ef46ef2412e54fd8b283a3d6141c559ca587.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/6/26576205c44bf0bf08675aa34f95175c68b67d67.png)

Thank you.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 15, 2023, 3:06pm UTC](https://forum.inductiveautomation.com/t/multiple-selection-dropdown/73726/2 "2023-05-15T15:06:46Z")

</div>

What database (MySQL, MS-SQL, etc.) are you using?

---

<div class="post-metadata">

**Author:** ![Alexandre\_Potvin](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Alexandre\_Potvin](https://forum.inductiveautomation.com/u/Alexandre_Potvin)\
**Post date:** [May 15, 2023, 3:08pm UTC](https://forum.inductiveautomation.com/t/multiple-selection-dropdown/73726/3 "2023-05-15T15:08:05Z")

</div>

The database i use is MS-SQL.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 15, 2023, 3:17pm UTC](https://forum.inductiveautomation.com/t/multiple-selection-dropdown/73726/4 "2023-05-15T15:17:09Z")

</div>

Can you use something like,

```auto
SELECT Name
  FROM NameList
 WHERE Name NOT IN ("Alice", "Bob", "Charlie")

```

The NOT IN list could be generated by an expression function combining all the already selected names.

I'm sure there's a better way to do it such as drag and drop names from a list into the machines - but it might not be so easy in Perspective.

---

<div class="post-metadata">

**Author:** ![Alexandre\_Potvin](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Alexandre\_Potvin](https://forum.inductiveautomation.com/u/Alexandre_Potvin)\
**Post date:** [May 15, 2023, 3:25pm UTC](https://forum.inductiveautomation.com/t/multiple-selection-dropdown/73726/5 "2023-05-15T15:25:47Z")

</div>

Ya good I will try to creat the list (("Alice", "Bob", "Charlie")) in a label and use 1 input.  
Thank You
