Jump to content

emailing an image that only has the filereference stored


hamelekim
 Share

This topic is 5629 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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?

Link to comment
Share on other sites

  • 2 months later...

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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

This topic is 5629 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.