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…
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
dropdownHeaders = ["Value", "Label"]
dropdownDS = 
i = 0
for row in results:
i = i+1
displayname = row
event.source.parent.getComponent('Dropdown').data = system.dataset.toDataSet(dropdownHeaders, dropdownDS)