kisscass Posted August 22, 2004 Posted August 22, 2004 Hi, I'm glad that FM7 now includes bcc emailing, which means that I can now use it to email our students without making their email addresses public. The only problem is that not all students have given us their email addresses, and I've found that if there are some blank email address fields the send mail script won't work. Is there some way of getting the script to ignore the blank fields? Thanks
andygaunt Posted August 23, 2004 Posted August 23, 2004 in your script add an If Statement around the email sending section of the script to see if the email address is not empty. If it is it will not try to send the email and will go to the next record Go To Record Request [First] Loop If Not IsEmpty (your email address field) ## Perform your send mail here End If Go To Record [next, exit after last] End Loop This assumes you are looping through the found set of records
kisscass Posted August 23, 2004 Author Posted August 23, 2004 Thanks for that - it worked great. (Anyone who is trying this looping method, remember to make sure that the checkbox in the specify send mail script to send the email to all found set is not checked otherwise it won't work if there is a blank record or it wil send multiple emails to everyone in the set. How could I do this without the looping, if I just wanted to send one standard email to the found set, but still ignore the blank fields?
andygaunt Posted August 23, 2004 Posted August 23, 2004 One way would be to create a list of the email addresses in a global field with the correct seperator between each address (obviously dependant on your email app) To do this you would need a global text field (lets call it gHoldEmails) and also to create a layout with just the email address on. Then in your script; Go To Layout [Email address only] Copy all records Go To Layout [a layout with the gHoldEmails global field on it] Paste [select entire contents tableref::gHoldEmails] Set Field [ Substitute (tableref::gHoldEmails; ["
Recommended Posts
This topic is 7400 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now