Reading a Tags Value and invrementing it by 1

I am wanting to get a tags value and increment it by 1. This is what I have. It is going in to a table.
I don’t believe it is reading the tag value

if  submitSuccess ==1:
      oldData=system.tag.read("[default]Moblie/AuditsCompleted")
      newData=system.dataset.setValue(data,insertrow,"AuditNbr", oldData + 1)
      data=newData
      event.source.parent.getComponent('Table').data=data

You need to get the value of the tag object that you are reading.

oldData=system.tag.read("[default]Moblie/AuditsCompleted").value
3 Likes