July 11, 200322 yr Newbies 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
July 11, 200322 yr 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, "
July 11, 200322 yr Author Newbies 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
July 11, 200322 yr Make sure the field you're setting is a global or it will only be available on the record you're currently showing.
July 11, 200322 yr 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)
July 11, 200322 yr Author Newbies 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
Create an account or sign in to comment