hmedia Posted April 26, 2006 Posted April 26, 2006 I'm needing a little clarification on something. I have a whole bunch of records, and a whole bunch of PDFs that I need to send out to the right person. The title of PDF includes a page number of a book spread I need a particular contributor to read and sign off. I have that same page number in the record where the info on the contributor resides. Is there a way to conditionally attach the corresponding PDF to the correct person's email? I've tried making the specified email attachment be seen as a Calculation like: Case(MyTable::MyPageNoField = "1" ; filepath to page 1 pdf; ... etc but it doesnt want to work. Any further ideas?
Fitch Posted April 26, 2006 Posted April 26, 2006 Set the file path into a script variable, then in the email script step use this variable where you specify the attachment path.
hmedia Posted May 1, 2006 Author Posted May 1, 2006 Sorry, thats great, but may I have some clarification on your clarification please. ;-P
Fenton Posted May 1, 2006 Posted May 1, 2006 Hidden in the mysterious FileMaker Help file, under Creating a Database, there is an entry for Creating File Paths (about 3/4's way down), which explains the syntax, incl. some examples at the bottom showing how to use them with Script Variables. It's all there, it's just hard to find in a hurry.
hmedia Posted May 1, 2006 Author Posted May 1, 2006 Thanks Fenton, V M appreciated. Am I to understand that, in this instance, a script variable will check the value of one field and do a unique action in response to that result? Like attach the correct PDF to the email? slightly unclear but I'll nut it out, I'm sure.
Fitch Posted May 1, 2006 Posted May 1, 2006 Mmmm, not exactly. The script variable doesn't "check" anything. You SET the variable to the file path of your attachment: Set Variable [$path ; "file:/computer/Users/you/folder/page " & MyTable::MyPageNoField & ".pdf" ] Your path on OS X will look similar to this, and your files in the example here would be named page 1.pdf, page 5.pdf, etc. Note: the variable name MUST begin with the $ symbol (or $$ but we won't get into that). Then in the Send Mail script step, where you specify the attachment, enter the name of your variable -- $path in the example above.
hmedia Posted May 2, 2006 Author Posted May 2, 2006 Wow!! Fitch and Fenton. You have made my day. You guys are officially on my Christmas list!! Thanks a million.
Recommended Posts
This topic is 7123 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