I have been trying to use send email function to send customised emails as alerts . The problem is when i run it in realtime it sends out repetitive emails of the same alert . I use the below code .
barcomplete = BarIndex() < LastValue(BarIndex());
if(LastValue(Ref(targets,-1)) AND barcomplete )
{
sendemail("text")'
}
how can i avoid sending out multiple emails for the same alert by using the send email function ?
Essentially, the main idea was to avoid repetitive alerts in a short sequence, and the solution is originally from the Say() function example; it uses a StaticVar to ignore redundant vocal messages. You can apply the same logic to avoid sending multiple emails.