Lets say I run this code to populate a table with battery voltages:
[code]query = “SELECT displayname, devicename from devices”
if event.propertyName in [“devices”, “refresh”]:
table = event.source.getComponent(‘Table’)
newData = []
header = [“Displayname”, “Identifier”, “Battery Voltage”]
res = system.db.runQuery(query)
tagPaths = []
for row in res:
tagPath = row[1]
tagPaths.append("%s/Volts"%tagPath)
results = system.tag.getTagValues(tagPaths)
idx = 0
for row in res:
displayName = row[0]
tagPath = row[1]
newData.append([displayName, tagPath, results[0+idx]])
idx += 1
table.data = system.dataset.toDataSet(header, newData)[/code]
Is there a way for me to add a filter to show only results that are <12?