# How to query Database Table to populate Power Table Drop Down List within cell

**URL:** <https://forum.inductiveautomation.com/t/how-to-query-database-table-to-populate-power-table-drop-down-list-within-cell/27614>\
**Category:** Ignition\
**Tags:** scripting, database, ignition79\
**Created:** [August 20, 2019, 11:25pm UTC](https://forum.inductiveautomation.com/t/how-to-query-database-table-to-populate-power-table-drop-down-list-within-cell/27614 "2019-08-20T23:25:38Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 27, 2019, 7:17pm UTC](https://forum.inductiveautomation.com/t/how-to-query-database-table-to-populate-power-table-drop-down-list-within-cell/27614/4 "2019-08-27T19:17:49Z")

</div>

Check out my post here:

> [@Force configure cell update in power table](http://forum.inductiveautomation.com/t/force-configure-cell-update-in-power-table/16318/7):
>
> The much more efficient solution is to embed a custom editor, which will lookup the datasets dynamically whenever it’s appropriate. I’ve got a very simple example of this below; the project has an editable ‘Options’ dataset, and the available options in column B in the editable table will be dynamic based on the value in column A. The relevant code is here: root = self from javax.swing import JComboBox, DefaultCellEditor, DefaultComboBoxModel class CustomCellEditor(DefaultCellEditor):…

Basically the same procedure would apply, except instead of fetching the options from another component, you would run your query. I would suggest putting your query onto a custom property on the power table - that way: 1. it's easier to control the polling rate, and 2. you don't ever run into a situation where your power table totally fails to render if a query times out or something else happens.

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-to-query-database-table-to-populate-power-table-drop-down-list-within-cell/27614)._
