Updating 1 of 2 columns in db from query?

I have a table that is pulling in alert info based on a db query from the sqlt_as table. I’m trying to allow editing directly from the table but my problem is that the Table I’m pulling the info into has 3 Columns - Alarm, Type, and Setpoint. The Setpoint (whether hi or lo) is based on the Type (*flag,0-digital 2-analog hi or 8-analog lo). My question is how could I base the query update for the Setpoint column on what alarm ‘Type’ is selected in the table? Forgive me if I’m asking this question wrong I’m still fairly new to Ignition…
Here is the update query for the table we have so far:

table = event.source.parent.TableName
pk = event.source.parent.PrimaryKey
colName = event.source.data.getColumnName(event.column)
colNamelow = “low”
colNamehigh = “high”

Handle the case where there are multiple primary keys

pks = [x.strip() for x in pk.split(",")]
where=""
for key in pks:
where += key + "=? AND "

remove trailing AND

where = where[:-5]

query = “UPDATE %s SET %s=? WHERE %s”% (table, colName, where)

params = [event.newValue]
for key in pks:
params.append(event.source.data.getValueAt(event.row, key))

fpmi.db.runPrepStmt(query, params)

I think an editable table is not the best approach to editing those alarms. We have a goodie that you can download that demonstrates how to edit the alarms. You can download it here:

inductiveautomation.com/downloads/extras

It is called “SQLTags Alarm Edit” and it an Ignition window export. In your designer right click on the Windows area and import the file.

For some reason I’m unable to import that SQLTagsAlarmEdit.fwin file. It lets me right click, select import and grab it but it never does bring it in. I’m able to import a .vwin file with no issue. I’m running Ignition 7.5.1.

Sounds like you downloaded the legacy version, try downloading the one listed under the “Ignition” header, it should be a vwin file.