Get Value of Checkbox - Update table accordingly

Morning all,

I have a column in a table that is boolean, either Auto or Manual.

I am trying to do 2 things. When a row is selected the checkbox value will show to be true if the lane is in AUTO and false if in MANUAL.

Based on the toggle of this checkbox a system.db.runNamequery will run.

Can anyone help with some suggestions?


	lane = self.getSibling("Table_Accumulation_Lanes")[0].lane 
	mode = self.getSibling("Table_Accumulation_Lanes")[0].assignment_mode
	auto = self.getSibling("Table_Accumulation_Lanes")[0].assignment_mode.AUTO
	manual = self.getSibling("Table_Accumulation_Lanes")[0].assignment_mode.MANUAL
	category = "HMI"
	source = "ASCADA Client"
	usr = self.session.props.address
	message = str(usr) + " Deleted assignment for lane " + str(lane)
	data9 = usr 
	if(self.getSibling("Table_Accumulation_Lanes")[0].assignment_mode == true):
		system.db.runNamedQuery("Tables/Update_PA_Lane_Mode_Auto",{"lane": lane})
		(self.getSibling("Table_Accumulation_Lanes")[0].assignment_mode == false):
		system.db.runNamedQuery("Tables/Update_PA_Lane_Mode_Manual",{"lane": lane})

I don’t think i fully grasp what is going on here, but if your values are “AUTO” and “MANUAL” then you do not have a Boolean type, maybe you are using a transform?

If I get You right, so here is my solution (hope it’s what You wanted :upside_down_face:):

the second part of Your question will looks like script on CheckBox (propertyChange/“selected” or if there’s something like actionPerforming event)
so, if value of CheckBox will change, so You can call scripts which You want