Create Dropdown from one column of a table

How do I create a dropdown list from just one column of an already populated table?

The table is returned to me as a stored procedure…

Columns: WorkOrderNum,StartDate,Priority,…

I just want to create a drop down that contains all the WorkOrderNum rows.

Is it possible? Yes I know I could have the Database guru change the SP but that takes an act of congress around here.

here is an example of taking a column out of a query and putting it into a dropdown. You would do pretty much the same on the returned result from your stored procedure.

query = "select devicename, displayname from devices where id < 10" results = system.db.runQuery(query) event.source.parent.getComponent('Table').data = results print results dropdownHeaders = ["Value", "Label"] dropdownDS = [] i = 0 for row in results: i = i+1 displayname = row[1] dropdownDS.append([i,displayname]) print dropdownDS event.source.parent.getComponent('Dropdown').data = system.dataset.toDataSet(dropdownHeaders, dropdownDS)