Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7400 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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?

Posted

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; ["

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.