# "tag".AlarmEvalEnabled Status within a Tag Folder

**URL:** <https://forum.inductiveautomation.com/t/tag-alarmevalenabled-status-within-a-tag-folder/32799>\
**Category:** Ignition\
**Created:** [March 4, 2020, 10:43am UTC](https://forum.inductiveautomation.com/t/tag-alarmevalenabled-status-within-a-tag-folder/32799 "2020-03-04T10:43:28Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzngyi](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@jzngyi](https://forum.inductiveautomation.com/u/jzngyi)\
**Post date:** [March 4, 2020, 10:43am UTC](https://forum.inductiveautomation.com/t/tag-alarmevalenabled-status-within-a-tag-folder/32799/1 "2020-03-04T10:43:28Z")

</div>

Greetings,

I need to check is any “tag”.AlarmEvalEnabled is FALSE within a tag folder. When the .AlarmEvalEnabled of any tag within the tag folder is set to FALSE, it should return a value of 1. Does anyone know how to do it?

---

<div class="post-metadata">

**Author:** ![mori.luca](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mori.luca/32/13424_2.png) [@mori.luca](https://forum.inductiveautomation.com/u/mori.luca)\
**Post date:** [March 4, 2020, 5:06pm UTC](https://forum.inductiveautomation.com/t/tag-alarmevalenabled-status-within-a-tag-folder/32799/2 "2020-03-04T17:06:10Z")

</div>

```auto
def AlarmEvalStateChecker(folder):

	tags = system.tag.browse(folder)
	
	for t in tags.getResults() :
		state = system.tag.read( str(t['fullPath']) + ".AlarmEvalEnabled").value
		if not state : return 1
	
	return 0

```

---

<div class="post-metadata">

**Author:** ![jzngyi](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@jzngyi](https://forum.inductiveautomation.com/u/jzngyi)\
**Post date:** [March 5, 2020, 5:36am UTC](https://forum.inductiveautomation.com/t/tag-alarmevalenabled-status-within-a-tag-folder/32799/3 "2020-03-05T05:36:13Z")

</div>

Thanks, that’s work.  
However, instead of this, is there any other method to receive a notification whenever a tag’s ‘Alarm Eval Enabled’ is turned off?

---

<div class="post-metadata">

**Author:** ![mori.luca](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mori.luca/32/13424_2.png) [@mori.luca](https://forum.inductiveautomation.com/u/mori.luca)\
**Post date:** [March 5, 2020, 9:29am UTC](https://forum.inductiveautomation.com/t/tag-alarmevalenabled-status-within-a-tag-folder/32799/4 "2020-03-05T09:29:57Z")

</div>

There are plenty of ways, just need to understand which approach is best for you I think.  
Now you have the information you need, you can decide where to store the actual information, and check if the value you read is different from the old one.

Another way I could think of is to create a folder of expression tag, binding them on the .AlarmEvalEnabled value, then write a script for the expression tag value change.

---

<div class="post-metadata">

**Author:** ![mori.luca](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mori.luca/32/13424_2.png) [@mori.luca](https://forum.inductiveautomation.com/u/mori.luca)\
**Post date:** [March 5, 2020, 9:34am UTC](https://forum.inductiveautomation.com/t/tag-alarmevalenabled-status-within-a-tag-folder/32799/5 "2020-03-05T09:34:58Z")

</div>

Could you please clarify what is the .AlarmEvalEnabled property goal?  
I never used the property, so I don’t know what is used for?  
There is an actual scenario where the value change without the user explicitly change by hand from the designer?

---

<div class="post-metadata">

**Author:** ![jzngyi](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@jzngyi](https://forum.inductiveautomation.com/u/jzngyi)\
**Post date:** [March 5, 2020, 12:31pm UTC](https://forum.inductiveautomation.com/t/tag-alarmevalenabled-status-within-a-tag-folder/32799/6 "2020-03-05T12:31:59Z")

</div>

Thank you for your reply! I use the property to disable my alarms when maintenance of the system is ongoing.

But when there were too many of them, the users will forget which tags has been disabled.

So I planned to use the script above to check within tag folders. Then I realised I will be facing lag issue as there are so many tag folders need to be checked.

---

<div class="post-metadata">

**Author:** ![mori.luca](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mori.luca/32/13424_2.png) [@mori.luca](https://forum.inductiveautomation.com/u/mori.luca)\
**Post date:** [March 5, 2020, 1:20pm UTC](https://forum.inductiveautomation.com/t/tag-alarmevalenabled-status-within-a-tag-folder/32799/7 "2020-03-05T13:20:50Z")

</div>

Mmm… I think you should not face any issue, from my understanding the property you want to handle, is a property that live in ignition.  
Your loops are all checking for property already available to you, you don’t need extra communication with PLC, so I guess that you should be fine even with a large amount of tags.

Hope some Dev can pop in and confirm/rectify my point.

---

<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:** [March 5, 2020, 1:39pm UTC](https://forum.inductiveautomation.com/t/tag-alarmevalenabled-status-within-a-tag-folder/32799/8 "2020-03-05T13:39:46Z")

</div>

> [@mori.luca](#):
>
> you should be fine

It would be best to run this sort of code in the gateway. Any repeated request to the gateway will have communications latencies multiplied by the repeats. So, I'd say, you _ **may** _ be fine.

---

<div class="post-metadata">

**Author:** ![mori.luca](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mori.luca/32/13424_2.png) [@mori.luca](https://forum.inductiveautomation.com/u/mori.luca)\
**Post date:** [March 5, 2020, 3:17pm UTC](https://forum.inductiveautomation.com/t/tag-alarmevalenabled-status-within-a-tag-folder/32799/9 "2020-03-05T15:17:26Z")

</div>

@pturmel Thanks, just for a personal understanding, if I would run a task like that one, on getaway side, should I use an parallel thread?

---

<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:** [March 5, 2020, 3:31pm UTC](https://forum.inductiveautomation.com/t/tag-alarmevalenabled-status-within-a-tag-folder/32799/10 "2020-03-05T15:31:35Z")

</div>

> [@mori.luca](#):
>
> should I use an parallel thread?

Probably not. Unless it takes seconds instead of milliseconds. Tag browsing is quick on the gateway since the raw data is right there in memory. So even repeated calls for recursion can be expected to run quickly, unless hundreds of thousands of tags are involved. In any case, use a gateway timer event to call a project script, and use the shared thread if it runs quickly. I recommend using the Java System.nanoTime() call to measure runtime if there's any uncertainty.
