Binding tag to History

Is there a way to bind a tag to enable and disable history? I see there is a way to do it in Perspective and not in vision. I would like to be able to control member of a UDT to enable and disable history via user choice.

A bidirectional binding in the UI can do this (on a toggle button, perhaps), if the tag isn't read-only. If read only, it must be scripted with system.tag.configure().

if you have multiple members in a udt you may want to track history for you can have a tag called enableHistory in the udt and run a script onChange of that to write to each tag.

something like this system.tag.writeBlocking(['[~]myTempTag.historyEnabled','[~]myPressureTag.historyEnabled'], [False,False])
You could technically read each tag that does have history enabled and disable that, but I wouldn't imagine you need that dynamic of a setup.

I should mention that this still applies like @pturmel stated.

Thank you. I will give this a whirl. I am guessing I would have to control other properties as well that relates to historian, dead band, sample rate, target historian etc.