Jump to content

Email attachment


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

Recommended Posts

In my database, I store cases assigned to me. Within each record I store a PDF version of that case in a field Case Brief::Case PDF.

I send a form email to the victims of each case requesting further info. The problem is I want to attach the PDF case to the email when I send it to refresh their memory on the case to which I am referring. The attachment part is where I get lost. Thanks for everyone's help. Im using work's version of 8.5.

Link to comment
Share on other sites

Basically, assign the file path to a script variable. Then use the script variable in the Export dialog. Then also use it again in the Email's attachment dialog. There are numerous posts here about using script variables as paths. There is also info in the FileMaker Help.

There is also a question about where to export it to. If indeed it needs to be exported (you did not say whether it was "embedded" in the container field, or only inserted [x] as reference only).

You can export it to your desktop, using the Get (DesktopPath), or you can figure out where your "temp" folder is. Several possibilities. But you should be able to find posts here about it.

Link to comment
Share on other sites

Thanks Fenton for the quick reply. I've spent time on your website, so it's an honor to get an answer from you.

I am really in over my head on these scripts but I got these from Hans. It creates the email and an attachment...however the attachment is not my attachment, just a small file (2kb) that can't be opened. Somewhere in the document path I am lost. Below are the three scripts I am using:

1.Import Document Script

Insert File [Reference; Case Brief::Case PDF]

2.Set Document Path

Set Variable [$$_document_path; Value:Let ( [path = Get (DesktopPath) ]; path )]

3.Send Mail

Set Variable [$_document_temp;Value:”/*Let(file_name = Case Brief::FileName; full_path = $$_document_path & file_name];full_path)*/”]

Export Field Contents [Case Brief::Case PDF; “$_document_temp”]

Send Mail [To:Case Brief::SM Name; Message: Case Brief::SM Name; “$_document_temp”]

My container field is Case Brief::Case PDF and it is referenced only.

My field name is Case Brief::File Name.

Please respond in terms a 3rd grader would understand. Thanks again.

Link to comment
Share on other sites

This topic is 5583 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
×
×
  • Create New...

Important Information

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