1 2 Previous Next 19 Replies Latest reply on Apr 29, 2017 5:40 PM by JackRodges

    sending a FileMaker file by email

    thehalpeen

      Summary

      sending a FileMaker file by email

      Product

      FileMaker Go

      Version

      13

      Operating system version

      IOS

      Description of the issue

      I'm trying to get a file of records in FM format from my iPad/iPhone to my PC - so I can update the master file.

      There is a scripted button to export a found set of records - see the attached screenshot of the script.

      When I press this button it runs a script to attach a FM file to an email. This works if you run it on a PC - the email client opens and you see the attached file of 'found records' ready to send.

      However the exact same script when performed on an iPhone opens the email, but no file is attached

      Configuration information

      See attached script

      Export_script.JPG

        • 1. Re: sending a FileMaker file by email
          TSGal

          Michael Lilly:

          Thank you for your post.

          Does the file (expanded $FileName) get created on the iPhone?  That is, if you return to the FileMaker Go Home screen and tap Device, is the file listed?

          TSGal
          FileMaker, Inc.

          • 2. Re: sending a FileMaker file by email
            thehalpeen

            No FM file is created/listed.

            If I change the file type from .fm12 to .xlsx and export as tab-separated, I do get an excel file that attaches to the  email, and yes an excel file then appears on the FMGo Home Screen.

            • 3. Re: sending a FileMaker file by email
              philmodjunk

              File extension should be .fmp12, not .fm12 so unless that's a typo in your post, this is probably the reason it's not working...

              • 4. Re: sending a FileMaker file by email
                thehalpeen

                Apologies, that is a typo - the extension in my script is .fmp12

                • 5. Re: sending a FileMaker file by email
                  TSGal

                  Michael Lally:

                  My apologies.  I did not look closely enough at your script.  Exporting to a FileMaker file is not supported in FileMaker Go.  You can either export to a text or Excel file.  If you want to create a database file with specific records, then use the Save A Copy As script step and select the clone option.  Then, open the newly created clone file and import from the main file as that will import the found set of records.  Then, you can attach the clone file to an email.

                  For more information about unsupported script steps, see Chapter 2 (beginning page 10) of the FileMaker Go Development Guide:

                  https://fmhelp.filemaker.com/docs/13/en/fmgo13_development.pdf

                  TSGal
                  FileMaker, Inc.

                  • 6. Re: sending a FileMaker file by email
                    thehalpeen

                    Thanks for your help. Maybe FileMaker could look at that in the next version.

                    • 7. Re: sending a FileMaker file by email
                      thehalpeen

                      Dear Support, Given that I want to send records for further processing from my iPhone back to the office by e-mail, what format can I email so as to get a set of forms/records  - and the form/records include a container fields with a signature/image. I cant' export as an Excel file because it won't accept containers, I can't send a FileMaker file  unless I send the whole database - so is there another format I can email which will include the container filed?

                      • 8. Re: sending a FileMaker file by email
                        TSGal

                        Michael Lally:

                        You can send a FileMaker file, but as mentioned earlier, create a clone (a copy with no records), and then import the found set of records into the clone file.  Once you have the desired records in the new file, then you can send that file by email.  For example, assuming your file is named "File.fmp12", create a script "EXPORT" as follows:

                        Set Variable [ $FilePath ; Value: "file:" & Get ( DocumentsPath ) & "Send.fmp12" ]
                        Save a Copy as [ "$FilePath" ; clone ]
                        Open File [ "Send.fmp12" ]

                        Run this script to make sure the Send.fmp12 file opens.

                        Switch back to "File.fmp12", and create a new script "IMPORT" with the steps:

                        Set Variable [ $ImportFile ; Value: "file:" & GetDocumentsPath) & "File.fmp12"
                        Import Records [ No dialog ; "$ImportFile" ; Add; Mac Roman ]

                        You won't be able to initially select fields, so specify the file "Send.fmp12" file to match up the fields, and then when the fields are matched up, change it to $ImportFile.

                        Once finished, close Send.fmp12.

                        Back in File.fmp12, run the script "EXPORT", as this will create a new clone of the file, as it now contains the script "IMPORT".

                        Open the EXPORT script again, and add the following script steps:

                        Perform Script [ "IMPORT" from file "Send" ]
                        Close File [ "Send" ]
                        Send Mail [ Send via E-mail Client ; No dialog ; To: <email address> ; Subject "Small File" ; "$FilePath" ]

                        If you now look at the whole thing, this creates a clone (copy with no records) of the current file, and then executes an import script on the clone file to bring in the found set of records, closes the file, and then emails the clone file.

                        Put the file on your iPhone and execute the script.

                        Let me know if you need additional clarification.

                        TSGal
                        FileMaker, Inc.

                        • 9. Re: sending a FileMaker file by email
                          thehalpeen

                          Thanks for your detailed reply - I'll give it a go.

                          • 10. Re: sending a FileMaker file by email
                            thehalpeen

                            Support, while testing your script, I fell at the first hurdle - I couldn't get the script to open the 'send.fmp12' file. I get the following error message -  The file "$FilePath.fmp12" could not be opened. (Not Found)

                            I've attached a screenshot of the code I used. Can you enlighten me?

                            • 11. Re: sending a FileMaker file by email
                              TSGal

                              Michael Lally:

                              Since the variable $FilePath already contains "file:", there is no need to include it.  Instead, in your File Path List, just use "$FilePath".

                              TSGal
                              FileMaker, Inc.

                              • 12. Re: sending a FileMaker file by email
                                thehalpeen

                                Dear TS,

                                I've entered "$FilePath" in the Edit Data Source - File Path List. However it seems to revert to file:"$FilePath" when I hit ok, 

                                • 13. Re: sending a FileMaker file by email
                                  TSGal

                                  Michael Lally:

                                  Your screen shot shows Edit Data Source.  Where is this appearing?  For which script command?  This should not appear for the Save A Copy As or Send Mail commands; the only commands needed for $FilePath.

                                  TSGal
                                  FileMaker, Inc.

                                  • 14. Re: sending a FileMaker file by email
                                    thehalpeen

                                    Dear TS,

                                    I have the file on my iPhone and I am running the attached script see   'messages.jpg'  However I get the attached error message see 'messages.jpg' and then the page gives me a option to select a file - see attachment 'messages.jpg'.

                                    Where am I going wrong?

                                    1 2 Previous Next