I have a form that has several fields that will need to trigger emails being sent to different people. For instance, if field1 is populated, I need to send an email notification to person 1,2 and 3 and if field2 is populated I need person 4 to receive a notification email. I know that @IF tests on the field along with the @Mailsend command in the querysave event of the form will accomplish this but how do I prevent the emails from being sent after the first change has been made? For instance, once they populated the field and save the form, I want the email notification sent. If they go back into the form that already has the field populated, make another change and save the form, the email should NOT be resent. Thanks in advance for any guidance or other siggestions.
Subject: Mailsend Question
What I have done is create hidden fields that hold a value to indicate of person 1, 2, and 3 have been notified already. The test whether to notify would include if the hidden field has a certain value.
Example of logic: If hiddenfield1 = yes and field1 != blank, sendmail, otherwise nothing…
Subject: RE: Mailsend Question
Thanks for the tip Tammy. How did you go about populating the hidden field? Once field 1 is populated did you have a formula in the hidden field that reads something like:
If field 1 !=blank; “TurnflagOn”; “TurnFlagoff” ??
Subject: RE: Mailsend Question
I usually have an agent set up that does the notifications. The formula I use for the notification based on field1 containing data will include the code to update hiddenfield1.
@If(field1 != blank & hiddenfield1 != “yes”; @mailsend & @setfield; “”)
Hope that makes sense. ![]()
Subject: RE: Mailsend Question
Thanks Tammy. That points me in the right direction. I should be able to tweak your approach from here.