# Cloud Templates browser / Active Alarms filter not working

**URL:** <https://forum.inductiveautomation.com/t/cloud-templates-browser-active-alarms-filter-not-working/11055>\
**Category:** Ignition\
**Created:** [January 16, 2016, 8:17am UTC](https://forum.inductiveautomation.com/t/cloud-templates-browser-active-alarms-filter-not-working/11055 "2016-01-16T08:17:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![R.Alamsha](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@R.Alamsha](https://forum.inductiveautomation.com/u/R.Alamsha)\
**Post date:** [January 16, 2016, 8:17am UTC](https://forum.inductiveautomation.com/t/cloud-templates-browser-active-alarms-filter-not-working/11055/1 "2016-01-16T08:17:10Z")

</div>

Cloud Templates browser / Alarms / Active Alarms:

The “TagPath” filter of Active Alarms template is not working. I tried to add another filter “displaypath” and didn’t succeed.

The existing expression for Alarms counter is:

## runScript(“len(system.alarm.queryStatus(path=[’”+ {Active Alarms.TagPath}+ “\*’],state=[”+ if({Active Alarms.ActiveAndAcked},"‘ActiveAcked’,","")+ if({Active Alarms.ActiveAndUnacked},"‘ActiveUnacked’,","")+ if({Active Alarms.ClearAndAcked},"‘ClearAcked’,","")+ if({Active Alarms.ClearAndUnacked},"‘ClearUnacked’,","")+ “]))”,1000)

Pls provide the right expression to query with either TgaPath or displaypath. Thanks.

---

<div class="post-metadata">

**Author:** ![R.Alamsha](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@R.Alamsha](https://forum.inductiveautomation.com/u/R.Alamsha)\
**Post date:** [January 18, 2016, 5:52am UTC](https://forum.inductiveautomation.com/t/cloud-templates-browser-active-alarms-filter-not-working/11055/2 "2016-01-18T05:52:50Z")

</div>

I am sorry. It works very well now. The problem was with missing wild card \* character.

I have added “DisplayPath” filter also and checked. Works perfectly. Still i am checking and will inform any malfunction if it happens. Thanks.

Corrected Code with “TagPath” filter:

## runScript(“len(system.alarm.queryStatus(path=[’”+ ‘_’+ {Active Alarms2.TagPath}+ "_’],state=["+ if({Active Alarms2.ActiveAndAcked},"‘ActiveAcked’,","")+ if({Active Alarms2.ActiveAndUnacked},"‘ActiveUnacked’,","")+ if({Active Alarms2.ClearAndAcked},"‘ClearAcked’,","")+ if({Active Alarms2.ClearAndUnacked},"‘ClearUnacked’,","")+ “]))”,1000)

Corrected Code with “DisplayPath” filter:

runScript(“len(system.alarm.queryStatus(path=[’”+  
‘_’+  
{Active Alarms.DisplayPath}+  
"_’],state=["+  
if({Active Alarms.ActiveAndAcked},"‘ActiveAcked’,","")+  
if({Active Alarms.ActiveAndUnacked},"‘ActiveUnacked’,","")+  
if({Active Alarms.ClearAndAcked},"‘ClearAcked’,","")+  
if({Active Alarms.ClearAndUnacked},"‘ClearUnacked’,","")+  
“]))”,1000)
