2 Replies Latest reply on Jul 26, 2012 6:35 PM by bergere

    Exporting record script



      Exporting record script


      FileMaker Go



      Operating system version

      scripts written in Windows 7

      Description of the issue

      I have a script in which records are exported to a file (defined by a variable) and then sent via Email. In filemaker pro and in the runtime version running on PC, everything works OK. When sued on filemaker Go 12, the email is prepared, but no file is attached and no file appear in the file chooser (I Pod touch version).
      If I try to reproduce the same via the user interface (not by script) it seems to work OK.

      It then appears that the file in which records are to be saved is not opened nor created,

      Steps to reproduce the problem

      as described above

      Expected result

      as described above

      Actual result

      no file created as no file is attached to the mail

      Exact text of any error message(s) that appear




        • 1. Re: Exporting record script

          Can you post a copy of your script?

          Your options for where you can save the PDF are much more limited in Go than in Pro so it may be that the filepath specified is one that works for Pro, but not in Go.

          To post a script to the forum:

          1. You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
          2. You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here.
          3. If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
          4. If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format. (Use the HTML option on the database tab panel and paste the text into the forum's HTML editor.)
          • 2. Re: Exporting record script

            I have attached a screen shot, but unfortunately, the script is in french. However, in brief, what I do is the following:

            1) I first look at the platform, and if mobile  (=3), I define a file variable named $$fichier without a path. When the platform is windows, the path for the file is in a directory called ATQ. The file name $$fichier will be of the type EVENE_specific ID_ YYMMDD_HHMMSS.DAT  for a windows based and for the mobile platform, I do not specify the .DAT extension since it does not appear to be supported in the litterature. (I have also tried the .TAB extension with no success for the mobile platform.)

            2) In a loop, I define the value of the field named "texte exporté" in the found set who contains the information to be sent. (This creates lines for a .DAT file to be received by another computer, and has to have specific format.)

            3) I export these fields to the file $$fichier.

            In another subroutine, I have the instructions to send mail with the $$fichier as attached file. I am not using the send mail feature of the export command because some users are using SMTP mail server and other are using a mail software. In any rate, it has worked fine up to now as all users were on windows 7.

            As additional information, I have however tried the same with the sed mail feature of the export command without success. The same holds true for the Open file command (the file does not open - probably because it is not created !)

            I think that the problem lies in the path (or non exxistence of a path for a mobile platform). The file does not seem to be created and thus no data is copied to it. Obviously, there is no corresponding file in the IPod chooser either.

            Jacques Kirouac