Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5267 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Output_file.png

Posted

The files need to be on the server, in the server Documents folder.

Posted

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.

Posted

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.

Posted

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?

Posted

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).

This topic is 5267 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.