# Possible to modify Tag Group properties through scripting?

**URL:** <https://forum.inductiveautomation.com/t/possible-to-modify-tag-group-properties-through-scripting/83143>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [December 14, 2023, 3:14pm UTC](https://forum.inductiveautomation.com/t/possible-to-modify-tag-group-properties-through-scripting/83143 "2023-12-14T15:14:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shawn\_Rieger](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shawn_rieger/32/46336_2.png) [@Shawn\_Rieger](https://forum.inductiveautomation.com/u/Shawn_Rieger)\
**Post date:** [December 14, 2023, 3:14pm UTC](https://forum.inductiveautomation.com/t/possible-to-modify-tag-group-properties-through-scripting/83143/1 "2023-12-14T15:14:59Z")

</div>

I'd like to modify the minimum sample rate or scan rate of a tag group via scripting. Is this possible?

Some background: We are looking for a way to slow the rate of historization when our edge sites lose connection with the enterprise gateway. The 20m record limit on Edge fills up quickly at some of our larger sites, and we'd rather have slower historization than lose data altogether.

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [December 14, 2023, 3:15pm UTC](https://forum.inductiveautomation.com/t/possible-to-modify-tag-group-properties-through-scripting/83143/2 "2023-12-14T15:15:41Z")

</div>

Can you not use a driven tag type, and link the driven expression to the comms value?

---

<div class="post-metadata">

**Author:** ![Shawn\_Rieger](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shawn_rieger/32/46336_2.png) [@Shawn\_Rieger](https://forum.inductiveautomation.com/u/Shawn_Rieger)\
**Post date:** [December 14, 2023, 3:19pm UTC](https://forum.inductiveautomation.com/t/possible-to-modify-tag-group-properties-through-scripting/83143/3 "2023-12-14T15:19:31Z")

</div>

I had no idea this existed until now and it seems it is exactly what we are looking for. Thank you!

---

<div class="post-metadata">

**Author:** ![Shawn\_Rieger](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shawn_rieger/32/46336_2.png) [@Shawn\_Rieger](https://forum.inductiveautomation.com/u/Shawn_Rieger)\
**Post date:** [December 14, 2023, 8:44pm UTC](https://forum.inductiveautomation.com/t/possible-to-modify-tag-group-properties-through-scripting/83143/4 "2023-12-14T20:44:22Z")

</div>

What are your thoughts on using the system gateway IsAvailable tag for this purpose?

If I understand this correctly, any tags using this tag group for history will scan every 3 seconds for changes. However, if the \_0:0:Enterprise/isAvailable tag turns false for any reason, the tag group will instead scan every 30 seconds for changes.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/b/8b2de66fcf3bdbad0f0f93341782cc417aa9f7b4.png)

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [December 15, 2023, 6:59am UTC](https://forum.inductiveautomation.com/t/possible-to-modify-tag-group-properties-through-scripting/83143/5 "2023-12-15T06:59:46Z")

</div>

That should be okay. So if this value turns to anything not 1, like 0 it should run at the 30000 rate

I would just double check if the availability is true/false or 1/0, I can't personally remember. If they're wrong it might not work as you want

---

<div class="post-metadata">

**Author:** ![Shawn\_Rieger](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shawn_rieger/32/46336_2.png) [@Shawn\_Rieger](https://forum.inductiveautomation.com/u/Shawn_Rieger)\
**Post date:** [December 15, 2023, 3:26pm UTC](https://forum.inductiveautomation.com/t/possible-to-modify-tag-group-properties-through-scripting/83143/6 "2023-12-15T15:26:06Z")

</div>

Yea, I noticed I couldn't place "true" in the Comparison Value section. I'll have to run a few tests to ensure it's working properly. Thank you!
