Jump to content

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

Recommended Posts

  • Newbies
Posted

I have a contact database with a defined "email" field. Basically I'm trying to set up a button to collect all the email addresses from a specific search, format them into a field, separate each of them with the required "; " and perform a copy command so that someone can then paste the addresses into their mail program and send mail. The script for the button is not an issue, the calculation field to assemble the addresses is where I need assistance. Thanks for your help. ses

Posted

There's no field calculation for this, you have to script it. There's 2 ways to script it, either a loop:

Set Field (gAllEmail, "")

Loop

.. Set Field (gAllEmail, gAllEmail & "; " & email)

.. Go to record (next, exit after last)

End Loop

Send Mail (gAllEmail)

Notice I used Send Mail at the end. Does that not work for you? The user shouldn't need to copy and paste the addresses.

The other method would be to set up a layout with only the email field on it:

Go to layout (email)

Copy All Records

Set Field (gAllEmail, Substitute(gAllEmail, "

  • Newbies
Posted

Thanks, I need a little additional help with "set field". I'm using Filemaker 5.5, when I program the script I don't think that I'm setting the field correctly. ses

Posted

Make sure the field you're setting is a global or it will only be available on the record you're currently showing.

Posted

Sorry, I should have mentioned that gAllEmail is a global. Also be sure that:

1. you set it to "" -- i.e., blank before you start the loop and

2. you are setting it to not just to the new value, but to itself and the new value,

as above: gAllEmail & "; " & email

Also you may want to add as the first script step just to be safe:

Go to record (first)

  • Newbies
Posted

Thanks for your help. Added bonus is that pasting the email set into word allows you to see any errors, carriage returns or incorrect spaces for addresses. more questions to follow. ses

This topic is 7876 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.