Unable to edit Entry Boxes

I am trying to create a small window that will update IP address’s that are tied to specific cell names in a database table. This is done by selecting a cell from a drop down box then the entry boxes shown in the picture below are filled base off columns in the database that corresponds to the selected cell. This script is done via a property change on the drop down menu.

When trying to change just the entry boxes after about 3 seconds it goes back to it’s previous value. Because the drop down’s box value didn’t change that script shouldn’t run again.

Property Change Script on the drop down box:

[code]connectionInfo = system.db.getConnectionInfo(dbConnectionName)
cell = event.source.selectedStringValue

query1 = “Select LocalIPAddress from ComputersIp where CellName = ‘%s’”%(cell)
query2 = “Select IPAddress from ComputersIp where CellName = ‘%s’”%(cell)
query3 = “Select HostMask from ComputersIp where CellName = ‘%s’”%(cell)

LocalIP = system.db.runScalarQuery(query1, dbConnectionName)
IP = system.db.runScalarQuery(query2, dbConnectionName)
HostMask = system.db.runScalarQuery(query3, dbConnectionName)

IPAdd = LocalIP.split(’.’)
event.source.parent.getComponent(‘Local1’).intValue = int(IPAdd[0])
event.source.parent.getComponent(‘Local2’).intValue = int(IPAdd[1])
event.source.parent.getComponent(‘Local3’).intValue = int(IPAdd[2])
event.source.parent.getComponent(‘Local4’).intValue = int(IPAdd[3])

IPAdd = IP.split(’.’)
event.source.parent.getComponent(‘IP1’).intValue = int(IPAdd[0])
event.source.parent.getComponent(‘IP2’).intValue = int(IPAdd[1])
event.source.parent.getComponent(‘IP3’).intValue = int(IPAdd[2])
event.source.parent.getComponent(‘IP4’).intValue = int(IPAdd[3])

event.source.parent.getComponent(‘Text Field’).text = HostMask
event.source.parent.getComponent(‘Cell Text’).text = event.source.selectedStringValue[/code]

Do you have that script on a propertyChange event? If so have you made sure to filter for the selectedValue or selectedStringValue properties like so:

if event.propertyName == "selectedValue":
   #the rest of your script here

If that’s not the issue then it sounds like you have a SQL Query binding that’s polling somewhere.

The code you gave me fixed the problem I had, but then created a problem where it wouldn’t update whenever I selected a different value from the drop down menu… so that solution won’t work.

The drop down does have a binding to a sql query. I am actually getting the selection values by a sql query from a table. Went into the data attribute where the polling is taking place and set it to off, which seems to have worked.

Thanks for your help.

No problem. Glad that you got the problem figured out.