Hi, I'm inserting data to a DB on tag value changed. The tag below isn't writing to the DB and shows as Null.
UserName = system.tag.readBlocking("[System]Client/User/Username")[0].value
All other tags (from default tag provider) are writing to the DB correctly, except for this one.
Be more specific about where you're calling this from. As in, literally on a tag's event script valueChanged? Because you can't read the client user name from that scope - you're in the wrong place.
Yes, that's the easiest way to get that info. Note that you won't be able to attest, for instance, that the tag was modified by the user in question - that event will fire once per open client whenever the specified tag(s) change.