I need to rename the items in the dropdown list where the item names are displayed through a query. The dropdown list shows {1,2,3,4}. So, I need to add 'motor' in the front of every number. {motor 1, motor 2, motor 3 ..ect}
Currently, I am unable to create the dataset in order to send it back to the dropdown list. (I am wiring script transform to query)
Here is the code
datas = system.dataset.toPyDataSet(value) # retrieve table data
columnName=list((value.getColumnNames())) #column name
Tblist = datas.getColumnAsList(0) #column data (rows)
newlist=[]
for i in range(datas.getRowCount()):
newlist += ['Inve No _'+ str(Tblist[I])] #add name to front
newdata=system.dataset.toDataSet(columnName,newlist) #create dataset
Give this error:
I think, the 'Tblist' is taken as a table with multiple columns but here it should be a single column with multiple rows as this table has only one column.
data: