Hello,
I'm trying to get the history alarms based on a time range and a property value. I created the following AlarmFilter but it doesn't seem to be working:
var alarmFilterByProperty = new AlarmFilterItemString(AlarmFilterField.PropertyValue, propertyName, AlarmFilterCompareType.Equality, new[] { propertyValue });
var alarmFilter = new AlarmFilter { FilterItems = new AlarmFilterItem[] { alarmFilterByProperty, }, };
Is there something that I'm missing in the filter? Or may the problem be in the SLNetMessage (I'm using GetAlarmDetailsFromDbMessage instead of the AlarmRepository)?
Hi Sebastian,
This syntax looks correct. Do note that you should use Type.Name as propertyName e.g. Alarm.Level. Not sure if this is the case.
It should not be a problem to use the GetAlarmDetailsFromDbMessage as Cube uses the same message to load the history tabpages in the alarmconsole.
That was indeed what I was missing. I was not including the Type to the propertyName.
Thank you!