Dynamic binding tags in table

You may want to read all the tag values at once.

[code]tagPathsToRead = []
#get values from dataset
for row in range(query_ds.rowCount):
id=query_ds.getValueAt(row,“id”)
tagname=query_ds.getValueAt(row,“TagName”)
description=query_ds.getValueAt(row,“Description”)
eu=query_ds.getValueAt(row,“EU”)
type=query_ds.getValueAt(row,“Type”)

Add the tagpath to the list

tagPathsToRead.append(tagname)
#create new row
newRow=[id,tagname,description,eu,type,None]
#add this new row
data=system.dataset.addRow(data,newRow)

tagValues = system.tag.readAll(tagPathsToRead)
for row in range(query_ds.rowCount):
data = system.dataset.updateRow(data,row,{“Value”:tagValues[row].value})[/code]