So I’m relative new to Python and Ignition to say the least. I have a dropdown menu that has two column and several rows of data manually entered into it. I’m having difficulty with some of the callouts in the code. What I would like to do is take data from the table of the dropdown menu and post it into another TextFeild box. I have accomplished this just by using binding but I would like to know how to do it with code. Here is a picture of what I’m trying to do. When I select data something in the blue I would like the correspond number to appearing in the empty red text box.
Here is a rough outline of my terrible code. As a side note I don’t know why there is a error in my “if” statement.
data = event.source.getComponent(“Table”).data
for row in range (data.rowCount):
for col in range (data.rowCount):
value = data.getValueAt(row,col)
#Error in if/else statment
if value = ‘’’<1 cfu/ 100ml (ECC)’’’:
print “Negative Test Results”
print “Positive Test Results”
Like I said I’m a big rookie at this so I’m excited to learn.