Hello All,
Is there any way to revise or remove a wrong comment inserted during an Alarm acknowledgment?
Thank you for your attention,
Ezio
How to remove/modify an Alert comment
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: How to remove/modify an Alert comment
Yes, this is possible.... but not very simple. An alarm isidentified by an datapoint element and an atime. An atime is actually a timestamp plus a counter. The challenge is that you can not ask the alarm for its atime.
So you'll need dpQueryConnect() to listen on alarms and keep the atime somewhere.
The easiest way to see how this can be done is to see how the alarm tabel does it.
Look at function 'as_commentAction()'. You'll see whatarguments it passes to the popup where you enter the comment.
"$dpid:" + dpSubStr(getAIdentifier(ti), DPSUB_SYS_DP_EL_CONF_DET),
"$time:" + (tim = ti),
"$count:" + (count = getACount(ti)),
The comment itself is a sinle string. Yes, you can append to it or completely ignore it.
I'm not sure what you want to do with the alarm. Note that besides the comment, there are additional 'free' fields where you can type text.
Good luck
Frenk
So you'll need dpQueryConnect() to listen on alarms and keep the atime somewhere.
The easiest way to see how this can be done is to see how the alarm tabel does it.
Look at function 'as_commentAction()'. You'll see whatarguments it passes to the popup where you enter the comment.
"$dpid:" + dpSubStr(getAIdentifier(ti), DPSUB_SYS_DP_EL_CONF_DET),
"$time:" + (tim = ti),
"$count:" + (count = getACount(ti)),
The comment itself is a sinle string. Yes, you can append to it or completely ignore it.
I'm not sure what you want to do with the alarm. Note that besides the comment, there are additional 'free' fields where you can type text.
Good luck
Frenk
- olduser2343
- Posts:20
- Joined: Thu Jan 01, 1970 1:00 am
Re: How to remove/modify an Alert comment
Thanks, very interesting.
I will check on our system for the solution.
Ezio
I will check on our system for the solution.
Ezio