Latched Alarm Condition

I am trying to create a latched alarm with the following behaviour
When a Float value is below a setpoint the alarm will latch on,
when the float value returns above the setpoint the alarm with remain on until a reset button is pressed by the user.

I have a fairly clumsy way of doing this with 3 tags per alarm, ie. a boolean alarm condition tag, a boolean alarm tag and a boolean reset tag. The alarm tag has the following expression behind it

switch({[.]AlarmCondition},1,1,
switch({[.]AlarmReset}, 1 , 0 , {[.]Alarm}))

I was just wondering if anyone could see a simpler way of achieving this ( with less tags required )?

You could get away with just one tag that you set and reset through scripting. For example, say your float tag is TagValue and your alarm is TagAlarm. The TagAlarm tag is a DB tag that has a static value. You can create a Tag Change Gateway Event Script on the TagValue with something like this:value = newValue.value if value < setpointValue: system.tag.writeToTag("TagAlarm", 1)That would set the tag alarm high when it falls below the setpoint.

Next, your reset button on the screen can simply do the following:system.tag.writeToTag("TagAlarm", 0)Otherwise, you have to use your method with multiple tags.