Can't get tag.configure to set the datatype

system.tag.configure(’[default]’, [{“name”: “Disabled-” + row[‘Unit’][‘value’]}, {“valueSource”: “memory”}, {“dataType”: “String”}, {“value”: val}])

I’m trying to create a tag and I was told to use configure. I get the tag created, but the datatype is incorrect, it’s always Integer. I’ve tried 7 as well. Of course the value isn’t set since I’m passing in a string. Any thoughts?Thx, jake

Two things:

  • One dictionary per tag should be sufficient.
  • Use tagType instead of dataType
system.tag.configure('[default]', [{'name': 'Disabled-' + row['Unit']['value'], 'valueSource': 'memory', 'tagType': 'String', 'value': val}])

I’m assuming a dictionary is separated by {}, I combined it into one and the tag didn’t create. Changing dataType to tagType made no difference, it’s still a Integer.Thx, jake

got it fixed:

system.tag.configure(’[default]’, [{‘name’: ‘Disabled-’ + row[‘Unit’][‘value’], ‘valueSource’: ‘memory’, ‘dataType’: ‘String’, ‘tagType’: ‘AtomicTag’, ‘value’: val}])

It required the tagType be atomictag and the datatype to be string.Thx, jake