AnsweredAssumed Answered

Server side script issue

Question asked by mcemond on Mar 4, 2016
Latest reply on Mar 11, 2016 by mcemond

I have created the following script..


Set Variable [$filename; Value: "All Employees - Time Sheet.xlsx"]

Set variable [$path; Value : Get (DocumentsPath) & $filename]

Go to layout [ "Time Cards Office - Full Screen" (logTime)]

Enter Find Mode []

Set Field [logTime::weekEnding; Date (1; 8; 1904) + ((Int((Get(CurrentDate) - Date (1; 9; 1904)) / 7) + 1) * 7)]

Set Error Capture [On]

Perform Find []

Set Error Capture [Off]

Sort Records [ No dialog]

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

Send Mail [ Send via SMTP Server; No dialog; To: "myemail";Subject:"Remote server test"; Message: "test"; "$path"]


So basically it grabs all the time log entries from the current work week and exports them to the Documents folder. Then it grabs the file and emails it off. So... this script works:


if Run manually on both servers, my iMac AND ODI's ( I receive the email with the attached file ) and Run as a scheduled script on my iMac Filemaker server ONLY (same result).


The script is not working as a scheduled script on a remote server hosted by ODI Tech. I have received confirmation from them that the files appear to be populating the ODI server documents folder but for some reason the email with attachment is not firing off. I receive the status email of:

"FileMaker Server 14.0.2 on reported the following event:

2016-02-26 22:30:00.379 -0500  Information  644  Schedule "eastpoint_daily_script" completed; last scripting error (3)."

644 = informational,  Schedule "%1" completed; last scripting error (%2).

Unfortunately I can't see schedules through ODI server admin or their status etc.

Because it runs as a scheduled script on my server here, the script itself must all be server compatible. And because files are being saved to the ODI folder, everything up to the export must be working there, so I'm not really sure what might be the issue. The script debugger revealed nothing. I know that the email is set up ok because the ODI server is sending me script generated emails (when performed manually) and I know the export and attachment process are server friendly because the script works 100% on my iMac server. So I'm not sure what I'm missing. Any help would be great. Thanks!