2 Replies Latest reply on Feb 15, 2012 10:10 PM by dumiya

    Script to email records being browsed from iPad to iPhone



      Script to email records being browsed from iPad to iPhone


      I have looked a the similar thread but it is different.

      This scrip works perfectly sending a list of records being browsed from iMac (FM11) to iPhone/iPad (FMGo).  .

      But when the script is used (wholly in FMGo) from iPad (FMGo) to iPhone (FMGo) it only emails the first record instead of the records being browsed. I would appreciate any help as the final plan is that it should work only in FMGo that is iPad to iPhone.  I have had a lot of help in the FMPro forum but the script needs to be adjusted for FMGo and that is quite beyond me. The Script FMPro is below:


      Set Variable [$FileName; Value:"Shopping List.pdf"]

      Set Variable [$PDFPath; Value:Get(DocumentsPath) & $FileName]

      Save Records as PDF [No dialogue; "$PDFPath"; Records being browsed]

      Send Mail [Send via E-mail Client; To: "xxx@xx.xxx"; Subject: "Shopping List"; Message: "List"; $PDFPath]


      Help would be appreciated

      **Added Later** the script only sends the selected item not the list.  Can't save the FMGo settingS "Current Record" to found set. keeps reverting to current record.

      ** Added later** The above script is forcing the setting "Current Record"  If I work it manually I can get the whole list. but after running the script I notice the setting is set to "Current Record" and unless I change it manually I get only the current record.

      I am not sure how to deal with this in the script  (Help)


        • 1. Re: Script to email records being browsed from iPad to iPhone


          Thank you for your post.

          I am unable to replicate the problem.  Here are the steps I took:

          1. In a test file (Test.fp7), I created a table with one Text field (Name).

          2. I entered two records: TSGal and dumiya

          3. I created a script similar to yours with the following steps:

          Set Variable [ $file ; Value: "file:" & Get (DocumentsPath) & "shopping.pdf" ]
          Save Records as PDF [ Restore ; No dialog ; "$file" ; Records being browsed ]
          Send Mail [ Send via E-mail Client ; No dialog ; To: "xxx@xxx.com" : Subject: "TEST" ; Message: "TEST" ; "$file" ]

          4. I turned on Network sharing.

          5. In FileMaker Go, I accessed Test.fp7

          6. With both records active, I executed the script, and the message was sent with the two records appearing in the PDF file.

          In case the "Save Records as PDF" script step is damaged, remove it and create a new one.

          Also, keep in mind that FileMaker Go will not overwrite existing files, so if you run this script a second time, the shopping.pdf file will not be overwritten, and a new shopping1.pdf file will be created.  Therefore, in the Send Mail script step, you may be attaching the original file.  Be sure to remove all instances of the shopping.pdf file before executing the script step again.

          Let me know if you continue to run into difficulty.

          FileMaker, Inc.

          • 2. Re: Script to email records being browsed from iPad to iPhone

            Hi TSGal

            Thank you for your help and interest. To be on the safe side I rewrote the 'shopper' file from scratch. I used your script (above). It looks good. I will test over the next few days in real situations (my wife!). Smile