Page 1 of 1

PDF thru FM Server

PostPosted: Tue Jun 19, 2007 11:58 am
by jim shelton
I have a script, which works fine if you are working direct, but does not completely work when using server 8.

The script allows users to create pdf of record, name the pdf, save to a specific folder and attach to an email.

Through server, the pdf is saved in Program/FileMaker. and does not attach to the email.

Help is appreciated.

thanks
Jim

PostPosted: Tue Jun 19, 2007 1:04 pm
by John Sindelar
Hmmm. Is this failing on the same machine that works when you open the file without server? Can you paste the script steps in here so we can see what's happening?

PostPosted: Tue Jun 19, 2007 2:32 pm
by jim shelton
Here is the script.


Send Quote PDF

If [ Order::AZ = "YES" and Order::AZ Set Up Charge A < 10 ]

Show Custom Dialog [ Message: "You selected Yes to AZ and have not entered AZ Set-Up Charges. Please check your enteries.", “Thank Youâ€

PostPosted: Tue Jun 19, 2007 2:43 pm
by John Sindelar
Hi Jimbo,

Seems like all that $platform and $path stuff is more complicated than it needs to be. I'd do something like this for the $FulPath:

"file:" & Get ( DesktopPath ) & Order::Quote# & ".pdf"

You can also use Get ( FileMakerPath ) if you don't want the file to end up on the desktop, but these Get() functions give you a way to put the file in the same "relative" place regardless of the setup of the user's machine.

Hope that helps.

PostPosted: Tue Jun 19, 2007 7:34 pm
by jim shelton
Is the location some how preventing the file being attached to the email?

PostPosted: Tue Jun 19, 2007 9:47 pm
by John Sindelar
Its the way you're describing the location in $FullPath (I think). Let me know if the "file:..." thing works.

PostPosted: Thu Jun 21, 2007 11:40 am
by jim shelton
Super that works. Now how can I put it in a specific folder instead of the desktop? Will Get (FilePath) work?

thanks,

PostPosted: Thu Jun 21, 2007 1:24 pm
by John Sindelar
jim shelton wrote:Super that works. Now how can I put it in a specific folder instead of the desktop? Will Get (FilePath) work?

thanks,


Great!

You can put it anywhere you can base on Get ( DesktopPath ) or Get ( FileMakerPath ).

PostPosted: Fri Jun 22, 2007 7:44 am
by jim shelton
I am not quite following you. Would it look like

Get (DesktopPath), "Proofs"

If I had a folder named proof on each desktop.

Jim

PostPosted: Fri Jun 22, 2007 7:54 am
by John Sindelar
No, then your path would look like this:

"file:" & Get ( DesktopPath ) & "Proofs/" & Order::Quote# & ".pdf"

Remember, though, that this won't make a new folder for you; the folder has to be there.

PostPosted: Fri Jun 22, 2007 8:13 am
by jim shelton
Perfect. Thanks,

Jim