Updating a SQL table from UDT tag

Morning all
I have UDT, within this there is a number of tags with alarms, I have created a common alarm bool expression tag which looks at the status of each alarmed tag and becomes true for any alarm.

I also have a “Tree View” that shows all the instances of the UDT with various info etc.
What I’d like to do is to update my table containing the data for the tree view so that if the common alarm is true I can change the icon and background colour.

I know the Update query required and it works, but I can’t quite see how to configure this in the UDT, I know I could use a transaction group but I would like the UDT to do it directly as in this project there could be thousands, each time I add a UDT I would have to map it in the transaction group.

I looked at a Gateway tag change script but again it seem that each tag would have to be listed, are wild cards accepted in the tag paths tag change scripts?


I’ve had a think about this and tried the following expression on a tag change trigger in the UDT

executeUpdateQuery(Update table1 SET Icon=“Builtin/icons/16/warning.png” where ID ={[.]ID},“Ignition”),

it dosen’t work but I feel I’m close. I think I may need more info on “executeUpdateQuery” can it accept a tag in the expression


Use system.db.runUpdateQuery() instead. If you need more information/examples of how it works and what parameters are passed, check out the user manual under appendix C.
inductiveautomation.com/support/ … equery.htm