Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

It worked wonderfully! Thank you.

My problem now comes when I try to declare the path to attach the pdf file for emailing.

I tried

file:"Get (ScriptParameter) & .pdf"

but this is not a path to an existing file.

Any thoughts? A solution will make my script fully dynamic.

Posted

Careful here, the quotation mark should be just in front of the .pdf

not in front of Get( ...because you then prevent evaluating the script parameter to evaluate!

--sd

Posted

sd,

Thanks; I made the correction.

file: Get(ScriptParameter) & ".pdf"

However, it still won't make the attachment I want. Is it because at that point in the script a file -

file: Get(ScriptParameter) & ".pdf" does not exist on the desk top.

Should I have the script place the file on the desktop first and then let the mail portion execute? Or am I totally misunderstanding the mailing function?

Posted

Well, now your file is on your desktop. It's name is: scriptparameter.pdf.

To retrieve it, it's

file: & Get(Desktoppath)& scriptparameter & ".pdf"

If your goal is to save a record as a pdf, then email it, you don't need to export and then import. Use the Save as PDF with the option to create an email with the file as attachment.

You might consider saving the file to Get(TemporaryPath) rather than Desktop. This way the files don't accumulate on the desktop. The OS will delete the contents of the Temp folder at shutdown.

Posted

Of the same command, no when you use that will there only be created a new mail, lacking all the rest.

But instead should you use this step just after what you have accomplished until now:

http://www.filemaker.com/help/ScriptsRef-262.html

Give it a stab, and then use this when you wish to delete the attachement after sending the e-mail.

http://www.databasepros.com/FMPro?-DB=resources.fp5&-lay=cgi&-format=list.html&-FIND=+&resource_id=DBPros000819

--sd

Posted (edited)

I'm so close. Using the following file paths, with Content Area List.pdf on the desktop and $$ScriptParameter = Content Area List; the attachment works for the second option, but not the first.

file:$$ScriptParameter &."pdf"

file:Content Area List.pdf

It must be syntax, but I can't seem to get it right.

None of theses work.

file:& Get(DesktopPath) & ($$ScriptParameter) & ".pdf"

file: & ($$ScriptParameter) & ".pdf"

file: & $$ScriptParameter & ".pdf"

file:& Get(DesktopPath) & $$ScriptParameter & ".pdf"

Edited by Guest
  • 1 month later...

This topic is 6102 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.