Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Set Variable [$path; Value "file;" & Get(DesktopPath) & "Name.pdf"

Save Records as PDF [Restore; Append: No dialog; "$path"; Records being browsed]

I would like to replace "Name" with a Parameter or calculated expression.

Any thoughts?

Why not:

Set Variable [$path; Value "file;" & Get(DesktopPath) & Get(ScriptParamter) & ".pdf"]

--sd

In the English version, it's "file:" with a colon, not semicolon.

Good spotted, I just copied and pasted!

--sd

  • Author

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.

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

  • Author

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?

  • Author

Addendum:

I placed the pdf file on the desktop and then ran the email portion to no avail.

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.

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

  • Author

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

Alright you need to omit the extention, I couldn't remember that. Take a look at the template I attach... does all I suggested.

--sd

ToPittsburgAndBack.zip

  • 1 month later...

Thank you for including the attachment. I have been able to get this functionality to work now that i have viewed your script !

  • Newbies

Ditto. Thanks for all.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.