# Alarm Status Table createPopupMenu

**URL:** <https://forum.inductiveautomation.com/t/alarm-status-table-createpopupmenu/10591>\
**Category:** Ignition\
**Created:** [October 8, 2015, 2:37am UTC](https://forum.inductiveautomation.com/t/alarm-status-table-createpopupmenu/10591 "2015-10-08T02:37:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [October 8, 2015, 2:37am UTC](https://forum.inductiveautomation.com/t/alarm-status-table-createpopupmenu/10591/1 "2015-10-08T02:37:40Z")

</div>

As far as I can tell, the instructions for the createPopupMenu are wrong. If you try to use selectedAlarmEvents it works fine. However, if you try to use alarmEvent.get() it creates an error ‘alarmEvent undefined’. This is unlike the double click script which works perfectly.

I am using 7.7.5

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [October 8, 2015, 2:27pm UTC](https://forum.inductiveautomation.com/t/alarm-status-table-createpopupmenu/10591/2 "2015-10-08T14:27:41Z")

</div>

Can you show a snippet of the script where you get that error?

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [October 8, 2015, 3:44pm UTC](https://forum.inductiveautomation.com/t/alarm-status-table-createpopupmenu/10591/3 "2015-10-08T15:44:16Z")

</div>

Sure. Simple script:

`	target = selectedAlarmEvents
	print target
	name = alarmEvent.get('name')
	print name`

error:

[quote][Event[name=Condensate flow low low alarm, source=prov:default:/tag:CP2B/FIT102/LL\_Al:/alm:Condensate flow low low alarm, priority=High, desc=null]]  
ERROR [StatusChart-AWT-EventQueue-2] Error invoking extension method.  
Traceback (most recent call last):  
File “”, line 17, in createPopupMenu  
NameError: global name ‘alarmEvent’ is not defined[/quote]

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [October 8, 2015, 3:56pm UTC](https://forum.inductiveautomation.com/t/alarm-status-table-createpopupmenu/10591/4 "2015-10-08T15:56:15Z")

</div>

Try something like this:

` target = selectedAlarmEvents
   print target
   for alarmEvent in selectedAlarmEvents:
       name = alarmEvent.get('name')
       print name`

More than one alarm event could be selected, so selectedAlarmEvents is a collection of all the ones selected. To get the properties of a single selected alarm event (even if only one is selected), you need to access a single member of the collection.

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [October 8, 2015, 4:10pm UTC](https://forum.inductiveautomation.com/t/alarm-status-table-createpopupmenu/10591/5 "2015-10-08T16:10:01Z")

</div>

Perfect.

Thank you for clarifying. I wish these scripts had a little more documentation. I guess that is what we are doing here. 🙂
