5 Replies Latest reply on Dec 2, 2014 1:31 PM by philmodjunk

    Button that copies email addresses from portal list

    D.S.

      Title

      Button that copies email addresses from portal list

      Post

      Hiya

      I have created a portal that serves as a directory for people.

      I would like one button below the portal that collects all the email addresses from the portal and copies them to the clipboard.

      Is this poss?

      Thanks!

        • 1. Re: Button that copies email addresses from portal list
          SteveMartino

          Yes, but why?  What do you want to do with it on the clipboard?  Is the portal all the people in the directory, or is it filtered to only show some of the people in the directory?

          • 2. Re: Button that copies email addresses from portal list
            D.S.

            Hi Steve

            It's filtered to show *some* people.

            I want the emails saved to the clipboard so I can paste them into an email client.

            Thanks

            • 3. Re: Button that copies email addresses from portal list
              philmodjunk

              If you can use an email client that is compatible with FileMaker, there is no need to copy the data.

              The fact that your portal is filtered will make this more difficult.

              You have options:

              a) set up a looping script to loop through the rows of the portal building a list of these emails in a variable or global field.

              b) Modify the portal design so that a relationship matches to records such that the portal filter is no longer needed. Then the List Function can be used to collect the email addresses in a list in a variable or global field. The substitute function can be used with List to replace the returns that list uses to separate the values with a semi colon or comma (whichever works with your email client program.)

              c) Use ExecuteSQL with JOIN and WHERE clauses that reproduce the same results as your relationship and portal filter. You can specify a "record separator" of either a comma or semi-colon. You can set a global field to the results of this function call.

              With all of the above, you can set a global field (if collecting the data in a variable) to the value of the variable and then your script can copy the contents of this field to the clipboard.

              But keep in mind that none of ths is necessary if you are using FileMaker's send mail script step.

              • 4. Re: Button that copies email addresses from portal list
                D.S.

                Thanks Phil - the List function sounds a goer!

                • 5. Re: Button that copies email addresses from portal list
                  philmodjunk

                  But please note that List will ignore portal filters. You have to be able to come up with an UNFILTERED portal that lists the emails that you want before that option will produce the desired list of email addresses.