abomb Posted August 18, 2006 Posted August 18, 2006 Hey Everyone, Trying to auto-email a quote to a customer. I have seen a bunch of posts and read the filemaker help but I'm still not able to get this to work/really understand what it is doing. This is the first time I'm using variables and am not understanding how to make it work. Here's the part of my script... Set Variable [$Saveas; Value:Customer::Name and "-" and Quote::QuoteID] Save Records as PDF [Restore; "$Saveas.pdf"; Create email; records being browsed] Is this how it would be done? I get it to save in "My Documents" but it doesn't save how I want it to, "CustomerName-12345", it saves as "untitled" or "$Saveas". Any dumbed down help and/or references would be greatly appreciated.
IdealData Posted August 19, 2006 Posted August 19, 2006 You appear to have "quoted" the variable. Try this in your calculation: $Saveas & ".PDF" See the difference? I have concatenated two string values, whereas you are trying to name the file (literally) "$Saveas.PDF"
abomb Posted August 21, 2006 Author Posted August 21, 2006 Okay, I do see your point. I actually didn't mean to put the file name in quotes but it seems to be doing it automatically. In scriptmaker under Save record as PDF, Specify output file, I browsed for a path to My Documents and where it asks for file name I put Saveas.pdf(no quotes). It is saving, and even saving in the right place, but not the right file name. This may be wrong way to set the file path but I don't really know how else to do it.
IdealData Posted August 21, 2006 Posted August 21, 2006 Here's one that works - see the attachment The essential difference here is that you must ONLY use the variable to define the filename - you must not append the .PDF manually at any stage. In my example I have used some field data to determine the file name. You could extend this idea to incorporate any file or path specification (as an absolute value) into the variable and then only use the variable to determine the destination. HTH FileSave.fp7.zip
Recommended Posts
This topic is 6671 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 accountSign in
Already have an account? Sign in here.
Sign In Now