system.alarm.queryStatus return duplicate value?


Ignition 7.6.2
I use system.alarm.queryStatus to count alarms.
With a source filter list with 2 or more items results contain duplicates

import system

table = event.source.parent.getComponent('Table')

#num = ["01", "02", "03", "04", "05", "06"]
num = ["01"]
for i in range(len(num)):

	filtre = []
	filtre.append("*Batterie_" + num[i] + "/*")
	filtre.append("*BatterieSafe_" + num[i] + "/*")
	
	print num[i]
	print filtre
	
	res = []
	res = system.alarm.queryStatus(state=["ActiveUnacked", "ActiveAcked"],source=filtre);
	
	table.data = res.getDataset()
	
	for x in res:
		print x.getSource()
	
	#print res
	
	nb = len(res)	
	print nb
	system.tag.write("Synthese/NbAlarmModule_" + num[i],nb)

If only execute :

	filtre = []
	filtre.append("*Batterie_" + num[i] + "/*")

If only execute :

	filtre = []
	filtre.append("*BatterieSafe_" + num[i] + "/*")

3+2 != 10 :scratch:

Hi,

I’ll look into this. There are a few small issues with querying that I’ve been trying to track down.

Regards,

Hi,

It’s the wild card at the start of the path that is causing a problem, but we’ve fixed it, and it should be in 7.6.3.

Thanks,