# Product Code Drop-Down List

**URL:** <https://forum.inductiveautomation.com/t/product-code-drop-down-list/9361>\
**Category:** 3rd Party Modules\
**Created:** [November 20, 2014, 5:14pm UTC](https://forum.inductiveautomation.com/t/product-code-drop-down-list/9361 "2014-11-20T17:14:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ragu](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@ragu](https://forum.inductiveautomation.com/u/ragu)\
**Post date:** [November 20, 2014, 5:14pm UTC](https://forum.inductiveautomation.com/t/product-code-drop-down-list/9361/1 "2014-11-20T17:14:25Z")

</div>

Hello,  
In the project I’m working we have a lot of product codes. Unfortunately when we entered the product codes we didn’t follow a particular order ☹ , so now pick a code from the Drop-Down list became too tedious.

There is a way to sort the product code Drop-Down list?

Also do you now if it’s possible to apply filters, so that the Drop-Down will present just some products?

Thanks,

---

<div class="post-metadata">

**Author:** ![ragu](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@ragu](https://forum.inductiveautomation.com/u/ragu)\
**Post date:** [November 21, 2014, 9:57pm UTC](https://forum.inductiveautomation.com/t/product-code-drop-down-list/9361/2 "2014-11-21T21:57:38Z")

</div>

I guess I have found a solution myself, and maybe it can help someone else 🙂

So what I did is to use the standard drop down component, the Production Line Selector, a text for the filter and a check box to enable or disable the filter.

The drop down dataset is defined using system.db.runQuery which sorts and filters the data; the system.db.runQuery returns a dataset.

The query get generated every time the operator change the Production Line selection accordingly with the filter and the checkbox status.

I attached a picture and a text with the scripting if someone has the same issue

Ciao  
[FilteredProductCode.txt](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/c59aae0bb78370edc2aa0c6dd48455c8cf3f1076.txt) (3.05 KB)  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/756db50ecaa2470f4b9f3dc9dfe0cded694f09f3.PNG)
