(Version 8.0.13)
I’m trying to use alarm-based visibility animations to show different symbols when different priority alarms are active or shelved. I configured two alarms on a single tag for ease of testing. I use coalesce() with isAlarmActiveFiltered() to tell me the highest priority that’s active. See my expression below:
coalesce(
	// Check active High/Critical alarms (priority 3-4)
	// Return 5
	if(
		isAlarmActiveFiltered("*","*","*",3,4,0,1,0),
		5,
		null
	),
	
	// Check active Medium alarms (priority 2)
	// Return 4
	if(
		isAlarmActiveFiltered("*","*","*",2,2,0,1,0),
		4,
		null
	),
	
	// Check active Low alarms (priority 1)
	// Return 3
	if(
		isAlarmActiveFiltered("*","*","*",1,1,0,1,0), 
		3,
		null
	),
	// Check active Diagnostic alarms (priority 0)
	// Return 2
	if(
		isAlarmActiveFiltered("*","*","*",0,0,0,1,0),
		2,
		null
	),
	
	// Check active Shelved alarms (any priority 0-4)
	// Return 1
	if(
		isAlarmActiveFiltered("*","*","*",0,4,0,1,1),
		1,
		null
	),
	
	// No alarms active or shelved.
	// Return 0
	0
)
Note that in practice, the first wildcard of isAlarmActiveFiltered() (tagPath) will be replaced with ‘[tagProvider]tag/Path’.
My problem is that shelved alarms don’t get detected by the last isAlarmActiveFiltered(). When I shelve all active alarms, the expression outputs 0 instead of 1. I’ve also tried using that last instance as a standalone expression and it will return 1 when an alarm is active and unshelved, and 0 when it is shelved or cleared. I would expect 1 when active or shelved, and 0 when cleared.
Am I using the function incorrectly, is it not meant to do this, or is this a bug?
Thanks in advance.