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 )
how can i avoid sending out multiple emails for the same alert by using the send email function ?
When posting the formula, please make sure that you use
Code Tags (using
</> code button) as explained here:
How to use this site.
Code tags are
required so formulas can be properly displayed and copied without errors.
May 18, 2021, 9:46pm
@aditisingh you could probably adapt the code sample I posted some time ago in this past thread.
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.
You are calling SendEmail multiple times YOURSELF, so it does what you told it to do.
You should be using AlertIF function that automatically prevents sending repetitive alerts of the same type
Or you should prevent calling SendEmail multiple times YOURSELF as
@beppe told you.
August 27, 2021, 8:06am
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.