4 Replies Latest reply on Nov 16, 2011 11:50 AM by techt

    Ye olde "Export Field Contents"


      I'm having trouble scripting the "Export Field Contents" process. FMP11v3, Windows.


      I have a container field with scanned signatures that I need to export to a remote volume. The volume is mounted, and the current user has write privileges. In my script, I set the export path as a variable. When I execute the "Export Field Contents" script step, I get the following error: "Sample.png could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk." If I hard-code the export path to the exact same value rather than using a script variable, the export works (but this isn't a useful solution, since the path for each record needs to have a different file name). Similarly, exporting manually by clicking in the field, choosing the menu item "Export Field Contents..." and exporting to the remote volume works.


      Thanks in advance for any hints.


      - Rob Westergaard

        • 1. Re: Ye olde "Export Field Contents"

          Yes, pathing is always fun. The error your getting is because FileMaker can't find or write where you've pointed, or the filename itself is invalid (slashes or other non-ASCII characters in the filename).


          Can you export using the variable filename to the local desktop? I find it easiest to create a $output variable that can set part of the path with an additional variable for the filename. For example:


          "filewin:" & Get ( DesktopPath ) & Document::FileName


          Documents::FIleName could be a variable instead of a field value. This test at least confirms that there isn't anything wrong with the filename that's being used for Windows (or Mac for that matter). If you can save it locally, then you've resolved that as a possible issue. This format also allows for a unique name but a fixed path, which might work depending on your situation.


          Since right-click and export works, I'm going to guess it's something with the name, not the path. Give it a try and let me know.



          • 2. Re: Ye olde "Export Field Contents"



            The user may, but does so FileMaker Pro?




            • 3. Re: Ye olde "Export Field Contents"

              Yes, Winfried, I'm thinking along the same lines. When I script the export without specifying the path/file name and then manually select the remote volume, I see a message that says, "The file 'sample.png' already exists. Do you want to overwrite it?" However, that file does not already exist -- I'm guessing that this is a symptom of a permissions issue. I can see (empirically) that the user has write privileges to the directory, but not delete privileges. I will delve further with the IT department.

              • 4. Re: Ye olde "Export Field Contents"

                Not delete rightswill hold you up. Good catch!