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

I have used the extension function configureEditor to script defined drop down boxes within Power Tables before. Now I would appreciate some help using a database table query to populate the drop down cell.

I have read most of the related forum articles but I am still struggling. I am a rookie so I could really use some very specific scripting help.

My database table I want to query titled shift.
The column i would like the query drop down to be in is labeled name.

Believe me when I say your help is appreciated.

I am all perspective. So I donā€™t know if this helps or not.

But, I populate dropdowns with a named query or a query tag

SELECT part_code as 'value', part_type as 'label' FROM mes.lot_size;

then write that to the options props with binding.

I didnā€™t explain well enough, sorry.
Iā€™m wanting to use the Power Tableā€™s Component Scripting - configureEditor to create a Drop Down List within the same Power Table. This Power Table Cell Drop Down list would be populated by a Querying a data base table. Weā€™re using Version 7.9.4

Check out my post here:

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.

1 Like

Yeah, you definitely do not want to be running queries within these editor (and/or renderer) subclasses. The custom property should hold all of the possible dropdown options for the entire table, and be filtered in the editor/renderer to the appropriate items when triggered.

2 Likes

This article helped us accomplish our goal using Power Table Cell drop Down List.

2 Likes