3 Replies Latest reply on Jun 5, 2013 9:01 AM by philmodjunk

    Copy Email Addresses From Members Table

    EricCrespin

      Title

      Copy Email Addresses From Members Table

      Post

           Novace user here... still learning scripting in FM Pro. I have a Members Table where a field contains member email addresses. I cannot seem to create a simple script to apply to a button that will:

           Perform Find (Members Table: AddressEmail)

           Go To All Records and Copy All (Field) AddressEmail from Members Table to Clipboard

           (Copying email addys to clipboard as admin uses MailChimp to send global letters and newsletters to memebers)

           Go back to Original Layout

           Dialog "Email addys have been copied to clipboard"

           ---The best I seem to be able to do is have a script that will only copy the first record email addy but not all. 

            

           Help?

            

      6-4-2013_2-37-03_PM.jpg

        • 1. Re: Copy Email Addresses From Members Table
          philmodjunk

               Perform Find and Perform Find/Replace are not the same thing. You need Perform Find.

               See this thread for examples of scripted finds: Scripted Find Examples

               And the @ symbol of an email address will be interpreted by FileMaker as a special find operator unless you enclose search criteria using this character inside quotation marks.

               The loop you have does nothing as it copies the value of Members::AddressEmail into Members::AddressEmail--which means you are copying the data from a field back into the very same field.

               If you were on a  layout based on Members where AddressEmail is the only field on that layout, Copy All Records would copy a return separated list of addresses to the clipboard, but since you likely need a different character to separate the addresses, you may need to paste them into a field so that the substitute function may be used to replace the returns with commas or semi-colons.

          • 2. Re: Copy Email Addresses From Members Table
            EricCrespin

                 Please excuse my ignorace, but I do not completely understand how to get around or compensate for your suggestion of "And the @ symbol of an email address will be interpreted by FileMaker as a special find operator unless you enclose search criteria using this character inside quotation marks." 

            I did end up modifying the Perform Find/Replace to Perform Find, that was an error in my selections. 

            It seems like I need an IF statement/clause in my script and that is where I believe I am falling short. 

            I am on a fasttrack here with my learning curving so any helpful tips, suggestions, guideance is very much appreciated. 

                  

            • 3. Re: Copy Email Addresses From Members Table
              philmodjunk

                   My reference to the @ was a very general comment. I cannot easily be more specific without knowing more about what you are trying to do with this script--in particular what kind of find criteria you need to use to find the records that you want. It's possible that this won't be an issue for the type of criteria that you are using to find your records.