5 Replies Latest reply on Mar 16, 2013 7:10 PM by jameshoty

    Email Records within the Portal


      Hi FileMaker Developer,


      I have 3 tables, Table A is 1-to-many to Table B and Table C. I have a layout contsisting one fields from table A and 2 portal showing records from table B and C. The user can add records to table A, B and C as they wish.I want to email to only those records in table C (assuming email field exist). How can I achiever this?


      I tried creating a button that will run a script using "Send Mail", and I choose Send via "E-Mail client", create "Multiple emails" (one for each in found set) (see diagram below)

      Screen Shot 2013-03-16 at 6.39.25PM.png

      The email was actually sent for the first record of table C and for all record in table A. BUT what I intend to is to send to all record in table C for the record that I am viewing on table A.




      FileMaker developer since Oct 2012 I love it!

        • 1. Re: Email Records within the Portal

          Hi James


          You need to send the email whilst sitting on a layout based on Table C.


          Just before your Send Mail script set, add a Go to Related Record on Table C, pointing to the Table C layout. When you run the Send Mail script step, the found set of records will be the ones you want to send to in Table C.


          At the end of your script add: Go to Layout, Original Layout, which will put you back where you started.


          Best wishes - Alan Stirling, London UK.

          • 2. Re: Email Records within the Portal

            Hi Alan,


            I tried your suggestion but it will email to ALL the FIRST record of table C (Registration) that match ALL the record in table A (Preview).

            Screen Shot 2013-03-17 at 7.38.31AM.png

            I also try-and-error using the radio button "Match all records in current found set" but the result is the same.


            In additional an "error" pop up while I execute the script.

            Screen Shot 2013-03-17 at 7.28.51AM.png


            The ERD diagram attached

            Screen Shot 2013-03-17 at 7.56.22AM.png



            • 3. Re: Email Records within the Portal

              I believe you need to select the proper layout to display the related records. You have it set to current layout.

              • 4. Re: Email Records within the Portal

                Hello James,


                Your screenshots are very helpful.


                I suggest trying the following change in your "Go To Related Record" Options:


                    Where it says:


                        Show record using layout: <Current Layout>


                    Change it to specify a layout which is:


                        based on your Registration table occurrence.


                Leave the rest of the options as you already have them in the screen shot.


                This should avoid the error that your are presently seeing, and it should get you to the correct set of records that you need to send your email.


                As Alan has already noted, you will probably want a "Go To Layout: Original Layout" script step after you send the email, so that you return back to your layout based on Table A.


                I hope this helps & very best,



                • 5. Re: Email Records within the Portal

                  Hi Alan, Steve,


                  It WORKS! Thanks for everyone's time and effort, you are awesome


                  Screen Shot 2013-03-17 at 9.50.42AM.png


                  My customer reckons that this email feature is very important to his current issue with spreadsheet, integrate email with client contact (that is kept in spreadsheet) etc. He is also looking into SMS which I have no idea at this moment. I hope I can excite him when I show him the above solution. FileMaker rocks!


                  I have another request for this same app, do I open a new case or I can continue from here?