June 21, 201015 yr I have a script running at 30 minute intervals with an attachment. The attachment works fine when I run the script manually. However, during the schedule, the file does not attach. The first thing I do in the script is set a variable: Set Variable [$_filepath; Value:Get ( DesktopPath ) & "_revision-" & TimeStamptoString ( Get ( CurrentTimeStamp ) ) & ."xls" The custom function TimeStamptoString ( Get ( CurrentTimeStamp ) ) is self-explanitory, though one can read more about it here ( http://www.briandunning.com/cf/117 ) Later, I export data (see screenshot). Finally, in the SendMail script step (which is otherwise working fine), the subject includes Get ( CurrentTimeStamp ), so that the emails appear separately (I'm testing in Google, which lumps all the emails of the same recipient/same subject together). In the variable above, I was using Get ( TemporaryPath ), but I changed it to the Desktop in order to debug. Also, it should be noted that while I have access to FMP10 Server, I do not have access to the server machine. I know it is a Windows machine, but that is all I know about it. Can anyone help? Thanks.
June 21, 201015 yr Author Interesting. So the path needs to be something like this: File Path: /C:/Documents and Settings/myFolder/myFile Is that correct? Why doesn't Get ( TemporaryPath ) or Get ( DesktopPath ) work? It seems like both would point to the server since the script is called from the server in a schedule. Thanks.
June 23, 201015 yr Author Still not working; I have tried the following without any success: Get ( DocumentPath ) & File.xls Get ( TemporaryPath ) & File.xls Get ( DesktopPath ) & File.xls C:/Documents and Settings/subFolder/File.xls /C:/Documents and Settings/subFolder/File.xls C:/Documents and Settings/Administrator/My Documents/File.xls I also tried this - "C:Documents and SettingsAdministratorMy Documents" & "File.xls" - it didn't work because I cannot put a "" after "My Documents". So, I'm really confounded. When I run the script from the client (Macintosh), the SendMail properly finds the file and attaches it. However, when I run the script from a server schedule (Windows), I receive an email without the attachment. Can anyone shed some light on what I am doing incorrectly? Thanks.
June 23, 201015 yr Interesting. So the path needs to be something like this: File Path: /C:/Documents and Settings/myFolder/myFile Is that correct? Why doesn't Get ( TemporaryPath ) or Get ( DesktopPath ) work? It seems like both would point to the server since the script is called from the server in a schedule. Thanks. First, RTM and Help on file references. The form is: "file:" & get( documentspath) & "abc.xls" Second: how do you know it isn't working? You said you don't have access to the server; so you don't know what is actually in the Documents folder. You also do not describe how you put the file into the documents folder in the first place. How does it get there so it can be attached?
June 23, 201015 yr Author First, RTM and Help on file references. The form is: "file:" & get( documentspath) & "abc.xls" Second: how do you know it isn't working? You said you don't have access to the server; so you don't know what is actually in the Documents folder. You also do not describe how you put the file into the documents folder in the first place. How does it get there so it can be attached? Thanks, Bruce. I thought I had researched this properly before posting, but obviously, I was mistaken. To that end, this explains the process: http://help.filemaker.com/app/answers/detail/a_id/7035 My final variable is defined thusly: "filewin:" & Get ( TemporaryPath ) & "fileName-" & TimeStamptoString ( Get (CurrentTimeStamp) ) & ".xls" Also, many thanks to my friends at Beezwax Datatools for their suggestions (sent directly to me).
Create an account or sign in to comment