I need a quick way to programmatically override properties on certain tags inside a UDT. For instance, setting a custom description for multiple iterations of the same device. The solution I’ve come up with is to read the tag configuration using system.tag.getConfiguration and then search through the result and modify the ‘value’ property for the tag in question. Then I pass the modified configuration back into system.tag.configure. I’m able to successfully change the value I want, however, it seems that when I write the modified configuration, other properties on the tag are showing as overridden. The values still match the UDT definition but it doesn’t seem like this is right. Appreciate any ideas on how to prevent unintentionally overriding extra tag properties.
Simplified version of my script (I just hardcoded the property modification to keep the post shorter)
folder = "[default]CP1/Test Folder" updateTagName = 'UDT Tester' nodes = system.tag.getConfiguration(folder + '/' + updateTagName, True) nodes["tags"]["tags"]["value"] = "Divert 1" system.tag.configure(folder,nodes)
Multiple properties show as overridden even though I’m only changing the Value property