The coalesce is just thrown in for good measure in case the property doesn’t exist. That expression worked for me when I just mocked it up.
Also, turning the logger “Alarming.Notification.Pipeline.BlockEvaluationContext” will help you see when the expression is evaluated, and what it results in… though it doesn’t give you much more than that.
Though I should mention that in my test case, I just tried nothing more than just “{Phone}” as an expression, and it worked fine, both when the property was there and not.
How are you defining the Phone property on the alarm, is it an expression?
I did that originally as well. The two tags are defined as memory tags type Boolean. When I did >0 there was an error in the console saying a type mismatch and that it was receiving a string.
I have a UDT with those two tags in them and the picture shown is how they are attached. Do I need a .Value afterwards?
No… I mock the same thing up and didn’t have a problem. Is there any message in the console when you save the tag about bindings not compiling?
I can understand the type error on “{Phone}>0”, but if the tag is a bool, “Phone” alone should be fine, and in any case, “toBoolean({Phone})” should be a safe bet.
Are you sure it’s failing in the expression block? It can be a bit tricky to track down where things are going wrong in the pipelines… for example, I was just trying to test with a phone block set to “test mode”, but because I didn’t have any contacts with phone numbers, the test mode message wasn’t being printed out…
Worth bringing this topic back, as my search results did not provide any recent solutions.
We needed to split to two Rosters without going back to the tags and adding new event attributes. The solution was to incorporate some way to check for a string in the event source path.
We learned that the Expression Block didn’t function like an Expression Binding in a regular session would.