# Perspective dropdown alarm priority

**URL:** <https://forum.inductiveautomation.com/t/perspective-dropdown-alarm-priority/48975>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [July 20, 2021, 8:00am UTC](https://forum.inductiveautomation.com/t/perspective-dropdown-alarm-priority/48975 "2021-07-20T08:00:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michal.konopski](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@michal.konopski](https://forum.inductiveautomation.com/u/michal.konopski)\
**Post date:** [July 20, 2021, 8:00am UTC](https://forum.inductiveautomation.com/t/perspective-dropdown-alarm-priority/48975/1 "2021-07-20T08:00:08Z")

</div>

Hello everyone,  
I’m currently trying to make a dropdown selection to change the alarm priority in perspective  
I created a dropdown and connected its value to a script

```auto
if len(value)>0:
	#Get tag alarms 
	alarms = system.tag.browse(value + '/Alarms')
	#Get path to last element which is our alarm
	alarm = alarms[len(alarms) - 1]['fullPath']
	#Read priority of this alarm
	priority = system.tag.readBlocking([str(alarm) + '.Priority'])[0]
	return priority
#Fallback
return 'High'

```

The _value_ here is path to tag  
Then I created an _onSelect_ event and added a script like this

```auto
if self.view.params.path and self.props.value:
	#Get tag alarms 
	alarms = system.tag.browse(self.view.params.path+'/Alarms')
	#Get name of last element which is our alarm
	alarmName = alarms[len(alarms)-1]['name']
	#Write new priority from current dropdown value
	system.tag.editAlarmConfig([self.view.params.path],{'BadIOAlarm':[['priority','Value',self.props.value]]})

```

and the priority is changing but all the other alarm params are cleared (label, setpoint, etc.)

Have you any solution for this? Is there any more elegant way to do it?
