6 Replies Latest reply on Jun 28, 2016 5:03 AM by jamesg

    Container export to temporary path producing error code 100

    jamesg

      BACKGROUND

      • I am developing a document reference within our project management database. We have Macs and PCs.
      • We have a Windows server for Filemaker, totally separate to our Windows file server which stores all our project files.
      • Project files are archived to Blu-Ray every month.
      • The document table is linked to the job table.
      • The document table stores referenced files (PDFs, DOC, XLS etc) AND a copy of the referenced file.
      • The intention is that everyone should create a document and save it to the file server, then insert the file into a container that holds a reference only. Then when anyone of our team wants to amend the file there is only one place to search for the document and once they've made their amendment the saved referenced file is copied into the document table in a container field that embeds the file.
      • When the project is ready to archive all the files are burnt to Blue-Ray and removed from the server.
      • When this is done the referenced files will appear as missing but will still be available for quick access through the embedded container field.

       

      That's an outline of what I want to achieve and I'm almost there.

       

      THE PROBLEM

      However, I need to flag that the files have been archived. I thought I had it sussed:

      Click on a button to trigger a script that checks the referenced file to see if it's been moved and then conditionally change the colour of a field.

       

      Loop

        Set Variable [ $temp_dir; Value:$$platform_path & Get ( TemporaryPath ) & GetContainerAttribute ( document:: file_on_server ; "filename" ) ]

        Export Field Contents [ document::file_on_server; “$temp_dir” ]

        If[Get(LastError) ≠0]

        Show Custom Dialog [ Title: "error code"; Message: Get ( LastError ); Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]

        Set Field [ document::file_not_found; 1 ]

        Else

        Set Field [ document::file_not_found; 0 ]

        End If

        Set Variable [ $document_count; Value:$document_count - 1 ]

        Go to Portal Row [ Select; Next ]
      Exit Loop If [ $document_count = 0 ]

      End Loop

       

      When the script is run on a Mac and the file "document::file_on_server" was originally inserted using a PC then it marks the PC files as missing and vice versa. Can anyone see the blindlingly obvious thing that I'm doing wrong?!! Thank you.