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.

This > < Close to having FM Server save a found set as a .pdf, then e-mail to user

Featured Replies

I'm close, but I don't know where I'm muffing it; the user receives the e-mail, but no .pdf file attachment. Here's the script text:

WHen the script runs, I get the attached error message. What do I need to tweak? (Running FMS v20.x on a Windows network.)

Cheers,

Rich

 

Screenshot 2024-10-09 at 2.44.02 PM.png

Screenshot 2024-10-09 at 2.45.15 PM.png

in your $_Path don't put "file: " 

I usually do this after Save as PDF:

SetVariable $url = "file://" & If ( Get ( SystemPlatform ) = 1 ; "/Volumes" ) & $_Path

Insert from URL Dialog Off Target $attachment ; $url : cURL options: "--FM-return_container-varable" 

The use that $attachment variable in the email

  • Author

Thank you, but the user is still receiving an e-mail without an attachment. I _think_ it's because the $_Attachment variable hasn't been defined, yet, after making your recommended changes. (See attached.)

 

What changes should I make?

Thanks tons,

Rich

Screenshot 2024-10-10 at 1.18.04 PM.png

What happens if you do simply:

Set Variable [ $path ; Get ( TemporaryPath ) & "ESU 7 Monthly Product Code Summary Report.pdf" ]
Save Records as PDF [... ; "$path" ; ... ]
Send Mail [ ... ; "$path" ; ... ]

---
P.S. Please post your scripts as code, not as pictures.

 

 

  • Author

Beauty! Thanks, that works.

...and sorry about the pictures vs. code. 

Just now, Rich S said:

that works.

Good.

Just a small note about the "file:" prefix: you don't have to use it in the present case. But if you do, it needs to be without the trailing space you have in your original script (which I believe would have worked otherwise).

 

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.