Cannot write to UDT instance metadata documentation with system.tag.writeBlocking

I had a script that worked at 7.9 that would write to a tag’s .documentation field. This script still works at 8.0 if the tag is not a UDT instance. The script does not generate an error, it just does nothing. I am wondering if this error is the same error as listed in this post: http://forum.inductiveautomation.com/t/write-to-tag-engunit/27369/16?u=jacksone

Specifically what I am doing is this:

def recordActionDocumentationInTagDocumentation(tagPath,tagValue,docTagPath,reason,user,dt):
	print 'recordActionDocumentationInTagDocumentation: tagPath[%s],tagValue[%s],docTagPath[%s],reason[%s],user[%s],dt[%s])' % (tagPath,tagValue,docTagPath,reason,user,dt)
	d = {}
	d['reason'] = reason
	d['user'] = user
	d['time'] = dt
	d['value'] = tagValue
	
	dStr = system.util.jsonEncode(d)
	system.tag.writeBlocking([docTagPath], [dStr])

This method works if the tag path passed to this is the .documentation field of any ordinary atomic tag, but it does not work if the tag path is the .documentation field of a UDT instance.

Thanks

I was able to find a workaround to modify the scripts that worked. It uses the new system.tag.configure method instead of the system.tag.write (7.9)

def documentTag(tagPath,documentation):
splitPath = tagPath.rsplit(’/’,1)
newConf = [{‘name’:splitPath[1],‘documentation’:documentation}]
system.tag.configure(splitPath[0],newConf,‘m’)

I think this workaround will also work for other metadata properties that are UDT overrides that were able to be written at 7.9, such as engineering units, etc.