# Set \`historyEnabled\` through scripting

**URL:** <https://forum.inductiveautomation.com/t/set-historyenabled-through-scripting/42159>\
**Category:** Ignition\
**Created:** [January 12, 2021, 1:12pm UTC](https://forum.inductiveautomation.com/t/set-historyenabled-through-scripting/42159 "2021-01-12T13:12:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aamrc](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@aamrc](https://forum.inductiveautomation.com/u/aamrc)\
**Post date:** [January 12, 2021, 1:12pm UTC](https://forum.inductiveautomation.com/t/set-historyenabled-through-scripting/42159/1 "2021-01-12T13:12:07Z")

</div>

Hi ,

I’ve found out the `system.tag.browse` has the `historyEnabled` variable.  
[https://docs.inductiveautomation.com/display/DOC81/system.tag.browse](https://docs.inductiveautomation.com/display/DOC81/system.tag.browse)

I’m wondering how can I set the variables state through scripting.

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [January 12, 2021, 1:21pm UTC](https://forum.inductiveautomation.com/t/set-historyenabled-through-scripting/42159/2 "2021-01-12T13:21:06Z")

</div>

You can simple write to the HistoryEnabled property directly:

```auto
tagPath = "Path/To/Tag"+".HistoryEnabled"
system.tag.writeBlocking([tagPath],[True])

```

Check out: [https://docs.inductiveautomation.com/display/DOC81/system.tag.writeBlocking](https://docs.inductiveautomation.com/display/DOC81/system.tag.writeBlocking)  
For more info on the script function.

---

<div class="post-metadata">

**Author:** ![aamrc](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@aamrc](https://forum.inductiveautomation.com/u/aamrc)\
**Post date:** [January 12, 2021, 6:25pm UTC](https://forum.inductiveautomation.com/t/set-historyenabled-through-scripting/42159/3 "2021-01-12T18:25:46Z")

</div>

Thanks Brandon!

Worked like a charm
