April 28, 200619 yr I need to set up a script that will my client to email photos of paintings to various galleries. The image link is stored in the database and the image can be viewed in the database. I am wondering if it is possible to script attaching a file dynamically in filemaker? I know you can set a specific file but I can't find anything on naming the file to attach dynamically. Anyone know if this is possible?
July 11, 200619 yr You should be able to use the script variable to do this by storing the file name in the variable and then using that variable in the Attach File dialog. I have not tested this as typically I use SMTPit Pro to send nicely formated HTML emails. http://www.smtpit.com Daniel
July 11, 200619 yr To amplify what dharlow said. The FileMaker syntax file path for a referenced image is available via the GetAsText function. The absolute file path will be the last line (3rd line if local file, 2nd line if remote, as there is no relative path for a remote file). You didn't say whether it was local or not. So, you just need to parse out that last line, use Set Variable, and use that as the attachment. Looks like this: Set Variable [ $pic_path; filemac:/manavesh/Public/Wounded_man.jpg ] Then, in the attachment path dialog, just use: $pic_path (no quotes)
Create an account or sign in to comment