I'm having an issue with Document tags in a UDT. I'm saving an array to the document tag, and everything is working as expected, until the Gateway service restarts. After a restart, the Document UDT members all get set to null.
A single document tag (not a UDT member) looks to be working OK.
I did find this post from a couple of years ago about saving arrays into a document. As mentioned there it takes a round about way to get a Document to be an array and not an object - either sending the value through scripting or editing the raw value in the Tag Browser. Arrays also read as array.array
objects, not PyDocumentObjectAdapter
. It feels like using an array happens to be working, but maybe isn't officially supported?
Did you find a resolution to this?
Not really. I talked with support about it and they opened a bug, but I don't know if anything has been done.
From support:
I have been able to discuss a bit with dev about this and do some more investigating. This seems to have broken in 8.1.36, which is also the version where it was possible to double click edit document tags in the first place. Prior, it was possible to use system.tag.configure to set a document tag to a similar array like you've shown and have it persist through tag provider restarts.
It also seems to only apply to arrays that contain a string. Arrays of ints, bools, nulls, whatever work, even strings that are obviously castable (like "1") work fine.
I've gone ahead and written the bug ticket and they'll decide how they want to handle this as there needs to be a bit more internal discussion. I would imagine at this point by fixing whatever's going on with the UDT member tags breaking. Let me know if you have any further questions.