Retrieving Internal SQLTag Information

I (and others, see http://inductiveautomation.com/forum/viewtopic.php?f=70&t=5891&p=15753&hilit=sqltagprop#p15753) could really use additional read only access to the internal SQLTag DB.

I propose this access via a script function that would protect the internal DB from any harm. A candidate function patterned after “system.alert.queryAlertStatus” would look something like:

system.internalDb.querySQLTagProperties(tagPath, propName1, propName2, propName3, …)

This function would return a dataset drawing from the internal SQLTAG, SQLTAGPROP, … tables and real-time values as needed.

Sorry I didn’t reply earlier, your other post reminded me of this.

You can pretty much already do this with “system.tag.getTagValue(tagPath)”. The tag path is allowed to be qualified with a property name, so you can do things like:

system.tag.getTagValue('Path/To/Tag.AlertExecEnabled')

To read more than one, right now you’d have to loop through them, but soon (for 7.3, I believe) there will be a new “getTagValues” function that can take multiple paths.

Hope this helps,

Please see my related post at http://inductiveautomation.com/forum/viewtopic.php?f=71&t=6851&p=19892#p19892.

Hopes this thread helps others thumbing through the manual on this subject.