Hello,
I tried to use the GetActiveAlarmsMessage to fetch all alarms and filter them by a custom property. I found how to implement filtering by various fields through other dojo questions, but I'm struggling getting the filter to work for my custom property.
Here's how it looks:
var alarmFilterItem = new AlarmFilterItemString(AlarmFilterField.PropertyValue, "Alarm.CMDB System", AlarmFilterCompareType.Equality, new[] { "SNOW", "Automatic" });
var message = new GetActiveAlarmsMessage(-1)
{
Filter = new AlarmFilter(alarmFilterItem),
};
I read in the answers of this question that I need a prefix before the property name to specify it's source. I'm not sure if the prefix for custom properties is different, or it's not possible at all as I get a result with 0 alarms with the displayed request.
Any help is appreciated!
Hi Benjamin,
I tried doing this using your code and this seems to work fine on my system.
What database are you using? This could be a clue as to why it isn't working for you.
Kind regards,
Xander
Hello Xander, thanks for replying.
I figured it out in the meanwhile, explained in the other comment.
Best regards!