SQL query with table/row/value where clause

I want to use a container value from the selected table row as a where clause in the component scripting sql update query when I press a button.

queryValue = ‘520’
qv1 = event.source.parent.getComponent(‘Group 1’).getComponent(‘Table’).selectedRow
system.db.runUpdateQuery(“UPDATE FinishingResults SET Suspect = %s WHERE Container = %s” % (queryValue, qv1), ‘Thermoplastics’)

You will need to get the value from the dataset, not just the selectedRow.

table = event.source.parent.getComponent('Group 1').getComponent('Table') qv1 = table.data.getValueAt(table.selectedRow, "Container")

This worked great. Thanks