# Reset a specific datatype script

**URL:** <https://forum.inductiveautomation.com/t/reset-a-specific-datatype-script/28522>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [September 24, 2019, 7:30pm UTC](https://forum.inductiveautomation.com/t/reset-a-specific-datatype-script/28522 "2019-09-24T19:30:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![c.turmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/c.turmel/32/67745_2.png) [@c.turmel](https://forum.inductiveautomation.com/u/c.turmel)\
**Post date:** [September 24, 2019, 7:30pm UTC](https://forum.inductiveautomation.com/t/reset-a-specific-datatype-script/28522/1 "2019-09-24T19:30:40Z")

</div>

Hi there!  
I have made a specific datatype for an alarm (boolean) value that i read from the PLC. With this datatype i can also reset that alarm with my datatype.

I was hoping on making a toggle button that can reset all the tags that uses that specific datatype.

I was looking into calling this script : system.tag.browseTags  
to browse my specific datatype, but after that I’m not so sure on how to proceed to reset.

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [September 26, 2019, 6:39pm UTC](https://forum.inductiveautomation.com/t/reset-a-specific-datatype-script/28522/2 "2019-09-26T18:39:49Z")

</div>

Show us what you have so far, and we can help you from there. Also let us know what version of Ignition you’re using. Things are a bit different between v7 and v8, so we don’t want to chase the wrong rabbit if we don’t have to. 😉

---

<div class="post-metadata">

**Author:** ![c.turmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/c.turmel/32/67745_2.png) [@c.turmel](https://forum.inductiveautomation.com/u/c.turmel)\
**Post date:** [September 30, 2019, 3:40pm UTC](https://forum.inductiveautomation.com/t/reset-a-specific-datatype-script/28522/3 "2019-09-30T15:40:57Z")

</div>

Thanks for your reply! I figured it out.

---

<div class="post-metadata">

**Author:** ![c.turmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/c.turmel/32/67745_2.png) [@c.turmel](https://forum.inductiveautomation.com/u/c.turmel)\
**Post date:** [March 23, 2020, 7:32pm UTC](https://forum.inductiveautomation.com/t/reset-a-specific-datatype-script/28522/4 "2020-03-23T19:32:14Z")

</div>

So basically here is how we reset an alarm of a specific datatype, we use this to reset communication errors after a major power lost. It does all the called datatype at once.  
#Define paths  
alarmackpath = ‘‘specificcmdpath’’  
TAGTYPE = ‘‘DataTypename’’  
#Browse tags  
tags = sytem.tag.browseTags(parentspath=’‘tags’’, udtParentType= TAGTYPE, recursive= True)  
#Here we define the path of the tag and the extension (reset cmd)  
for tag in tags:  
tagPath = tag.fullPath  
ackalarm = tagPath + alarmackpath  
system.tag.write(ackpath, 1)
