# Help with dropdowns of operators and query parameters

**URL:** <https://forum.inductiveautomation.com/t/help-with-dropdowns-of-operators-and-query-parameters/73025>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 28, 2023, 2:22pm UTC](https://forum.inductiveautomation.com/t/help-with-dropdowns-of-operators-and-query-parameters/73025 "2023-04-28T14:22:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [April 28, 2023, 2:22pm UTC](https://forum.inductiveautomation.com/t/help-with-dropdowns-of-operators-and-query-parameters/73025/1 "2023-04-28T14:22:19Z")

</div>

**What do you do to allow for filtering data by operator from a dropdown that works best?**

I have tried some things, but the tradeoffs are vast, so I could benefit from help.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/2/02695e377c4010f16ff5786a4ef034127fd74171.png)

Here are my best 2 and a half techniques so far:

On page A:  
I type operator names as the value and the label both.

Cons for A:  
String compare  
Requires time to add or remove operators

Pros for A:  
Initial setup is fast  
Dropdown is reusable many places

On page B, I query all operators that worked in the last 6 months.  
Then I assign a number in alphabetical order.  
Then I bind the query to the options with value and label columns.

On page C, I do the same B except I add another parameter where the list of names is then filtered also by the production line.

Cons for B and C:  
Initial setup is slower  
Can't reuse the dropdown much  
Additional filters require filtering operator query  
Selecting other dropdown filters resets the dropdown of the operators

Pros:  
Automatically adds and removes operators

Is there a good solution I don't know about?  
Or do I need to have a table of operators and operator id numbers that I always reference  
Then have the operator id put in any table that displays the operator?  
Or will that just add more possible sets of errors?

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [April 28, 2023, 11:40pm UTC](https://forum.inductiveautomation.com/t/help-with-dropdowns-of-operators-and-query-parameters/73025/2 "2023-04-28T23:40:16Z")

</div>

Applications are not appropriate places to maintain lists of information. The best practice is to store and maintain your lists in a database, and set up your dropdowns in a way that queries their lists from there. Perhaps there is a greater initial setup and reusability cost, but in the long term, the maintenance costs are significantly reduced by this approach.

---

<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:** [April 30, 2023, 7:31am UTC](https://forum.inductiveautomation.com/t/help-with-dropdowns-of-operators-and-query-parameters/73025/3 "2023-04-30T07:31:56Z")

</div>

> [@justinedwards.jle](#):
>
> the maintenance costs are significantly reduced by this approach.

Not to mention the ability to then report on things as well
