AnsweredAssumed Answered

Export Data Script Fails with Remote Connection

Question asked by Robbie_1 on Feb 5, 2014
Latest reply on Feb 6, 2014 by Robbie_1

Title

Export Data Script Fails with Remote Connection

Post

     Hi, 

     I've built a script designed to export data from two different tables and provide an empty clone of the full database. The script works fine when the filemaker database is being hosted locally, but when I upload the database to filemaker server 13 and log in remotely the script fails. 

     Script looks like this....

     *

     Set Variable [$Filename; Value:"Cam_Data_" & ( Substitute ( Ranger Camera Set Ups::set ups wrangler ; "." ; "_" )) & ( Substitute ( Ranger Camera Set Ups::set ups shoot date ; "/" ; "-" ) ) & ".fmp12"

     Set Variable [$Setups_Filename; Value:"Cam_Data_" & ( Substitute ( Ranger Camera Set Ups::set ups wrangler ; "." ; "_" )) & ( Substitute ( Ranger Camera Set Ups::set ups shoot date ; "/" ; "-" ) ) & "_setups" & ".fmp12"

     Set Variable [$Takes_Filename; Value:"Cam_Data_" & ( Substitute ( Ranger Camera Set Ups::set ups wrangler ; "." ; "_" )) & ( Substitute ( Ranger Camera Set Ups::set ups shoot date ; "/" ; "-" ) ) & " _Takes" & ".fmp12"

     Set Variable [$Filepath; Value:Get ( DesktopPath ) & $Filename

     Set Variable [$Filepath_Setups; Value:Get ( DesktopPath ) & $Setups_Filename

     Set Variable [$Filepath_Takes; Value:Get ( DesktopPath ) & $Takes_Filename

     Freeze Window

     Save a Copy as ["$Filepath"; clone]

     Export Records [No dialog; "$Filepath_Setups"; Unicode (UTF-16)]

     Go to Related Record [Show only related records; Match found set; From table: "Takes"; Using layout: "Takes" (Takes)]

     Export Records [No dialog; "$Filepath_Takes"; Unicode (UTF-16)]

     Go to Related Record [Show only related records; Match found set; From table: "Ranger Camera Set Ups"; Using layout: "FORM - IPAD" (Ranger Camera Set Ups)]

     *

     When I try to pull up the debugger I get error code 3 highlighting "Export Records [No dialog; "$Filepath_Setups"; Unicode (UTF-16)]". Since the script works fine locally, and I only get the error when logging in remotely, I'm at a loss for what the problem could be.

     I've also tried to import the script to the remote DB to see what would happen, and received one error. When I checked the log it gives me error code 500, but I've checked the date preferences on both machines and they match, but even if they didn't it should not matter, correct? Since all I'm doing is taking a field's contents and replacing the "/" with "_"...  

     Both systems are Mac OSX 10.8.5

     Any help anyone can offer would be greatly appreciated. 

     Thanks very much!

Outcomes