# Binding tag to History

**URL:** <https://forum.inductiveautomation.com/t/binding-tag-to-history/95015>\
**Category:** Ignition\
**Tags:** vision, perspective\
**Created:** [August 22, 2024, 2:15pm UTC](https://forum.inductiveautomation.com/t/binding-tag-to-history/95015 "2024-08-22T14:15:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![IAKC](https://avatars.discourse-cdn.com/v4/letter/i/d2c977/32.png) [@IAKC](https://forum.inductiveautomation.com/u/IAKC)\
**Post date:** [August 22, 2024, 2:15pm UTC](https://forum.inductiveautomation.com/t/binding-tag-to-history/95015/1 "2024-08-22T14:15:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 22, 2024, 2:18pm UTC](https://forum.inductiveautomation.com/t/binding-tag-to-history/95015/2 "2024-08-22T14:18:55Z")

</div>

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()`.

---

<div class="post-metadata">

**Author:** ![Benjamin\_Furlani](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/benjamin_furlani/32/66084_2.png) [@Benjamin\_Furlani](https://forum.inductiveautomation.com/u/Benjamin_Furlani)\
**Post date:** [August 22, 2024, 3:05pm UTC](https://forum.inductiveautomation.com/t/binding-tag-to-history/95015/3 "2024-08-22T15:05:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Benjamin\_Furlani](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/benjamin_furlani/32/66084_2.png) [@Benjamin\_Furlani](https://forum.inductiveautomation.com/u/Benjamin_Furlani)\
**Post date:** [August 22, 2024, 3:19pm UTC](https://forum.inductiveautomation.com/t/binding-tag-to-history/95015/4 "2024-08-22T15:19:09Z")

</div>

> [@pturmel](#):
>
> if the tag isn't read-only. If read only, it must be scripted with `system.tag.configure()`.

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

---

<div class="post-metadata">

**Author:** ![IAKC](https://avatars.discourse-cdn.com/v4/letter/i/d2c977/32.png) [@IAKC](https://forum.inductiveautomation.com/u/IAKC)\
**Post date:** [August 22, 2024, 3:29pm UTC](https://forum.inductiveautomation.com/t/binding-tag-to-history/95015/5 "2024-08-22T15:29:39Z")

</div>

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.
