Acknowledge alert through script


I have 150 UDT instances. I have enabled alerts for each of the 150 tags.
I have linked it to a display and based on the alert condition I change the background color.
I would like to acknowledge the alert using a pop up.
this is how I do it;
I click on the display and a pop up opens and a parameter is passed.
I have 150 displays. the parameter that is passed is the tag number.
I have a button on the popup which I would like to use to acknowledge the alert.
I use the following code:


I get the error :

cannot write to tag, not allowed to write.

I have all the administrative rights to write to a tag.
But I am unable to do so

Looking forward to a solution.

That value you tried to write to is one of the metadata values for a tag, it tells you if the current alert has been acknowledged or not, it doesn’t actually perform an “acknowledge” action. If you want to actually acknowledge the alert, you need to use system.alert.acknowledgeAlert(): … ealert.htm