Issue with Scripting Attachment of Document

Discussion created by MattLeach on Apr 15, 2013
Latest reply on May 5, 2013 by ekettu

I've come across an issue that i believe i know what the problem is, just don't know how to go about correcting it.


I've created a layout where a user either selects an email address (from dropdown) or types on in. They also have a drop down to select a document they would like to email. The list of documents is linked to a table that has the document name and path.


In the script to send, i'm taking the document path and storing it in a variable to use in the email, but the document never makes it as an attachment in the email as you can see in the screenshot below:




My assumption is that the issue has to do with the formatting of the document path.


I then changed the variable of $DocPath to be:


"filewin:/: & Substitute ( EmailDocs::DocPath ; "" ; "/" )


However, filemaker does not like this and states that "The text constant does not end with a quotation mark."


Am i correct in my assumption, and if so, how can i format the path properly.

If i am incorrect, why is the document not attaching?