Toggle email on alarm check box from viewon screen

Hey support team,

Do you know how I can toggle the Email on Alarm Check Box in the tag configuration from a ViewOn Screen?

I would like to be able to toggle this bit on and off….

image|661x403

From a Screen/Object like this…
image|419x258

@Jcadorette

Can you re-upload your images? They appear to be missing.

Do you know how I can toggle the Email on Alarm Check Box in the tag configuration from a ViewOn Screen?

I would like to be able to toggle this bit on and off….
image

From a Screen/Object like this…
image

@Jcadorette

I was able to get this working a couple different ways but I found that creating a mem tag helped make this look cleaner so that we don’t need 2 checkboxes or 2 buttons. I’m sure there are more options here if we use java script as well.

In my example,

1 - Create a boolean mem tag in the eWON device, I called my tag “MyBit”
2 - Add an ONCHANGE listener for this mem tag in the init section
3 - Add a section in the BASIC IDE that checks this bit ONCHANGE and then disables or enables the alarm depending on this bit value.

Init section:
ONCHANGE "MyBit", "goto AlarmEmail"

AlarmEmailSection:
AlarmEmail:
IF (MyBit@ = 1) THEN
SETSYS TAG, "LOAD", "My_Test_Tag"
SETSYS TAG, "DoSetVal", 1
SETSYS TAG, "EEN", "8" // value of 8 enables the email upon alarm
SETSYS TAG, "SAVE"
Print "Email upon alarm enabled"
ELSE
SETSYS TAG, "LOAD", "My_Test_Tag"
SETSYS TAG, "DoSetVal", 1
SETSYS TAG, "EEN", "0" // value of 0 disables email upon alarm
SETSYS TAG, "SAVE"
Print "Email upon alarm disabled"
ENDIF
END

ViewON
4 - Create a checkbox in viewon (drawings / graphical components / checkbox)
image
5 - Click on your checkbox and go to the actions tab
6 - Right click in the empty field, and click send command

image

7 - Configure your checkbox to write to your boolean mem tag, and set ’ value when selected to’ to 1 / ‘value when not selected’ to 0

8 - Export your ViewOn page back to your eWON and you should be good to toggle your checkbox :smiley:

Hi Joe,

I am not clear about use of the code. Can you please explain the use case?

@Mihir

This is used to disable an email upon alarm setting for a tag using a checkbox in ViewON.
I fixed the video in my original post which may help with understanding the concept.