I am making a platform for a client, in which tag values get displayed in certain views, based on each tag’s Function, a custom property I added. Users are able to configure each tag’s function in a designated screen.
However, when a property’s value is changed and changed back to default, it is shown as “Overrides Parent Properties”, despite being the same value as default. While testing this new functionality, I used different tags that now all show as ‘Overriden’, while the values are original.
As the title reads; Is it possible to reset the tag property to default, in scripting?
You should be able to read the default value from the UDT definition and then write it? Otherwise, can you read the JSON to find the override, remove it, and then write it back? I haven’t done much with the JSON tag stuff but I know the override information is in there somewhere.
Whenever you feed the output of system.tag.getConfiguration() back into system.tag.configure(), you get lots of unexpected overrides.
Construct a list of one configuration dictionary with just the tag name and the props you want to override, and then use system.tag.configure() with merge mode.