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.

Having issues getting attachments to Mail to work

Featured Replies

Hi everyone,

I'm trying to get attaching files go mails generated using FM17 to work. The idea is to attach a variable file to a mail-message generated for a specific record. The filename for the attachment is specific to the record and I've got a field that generates that filename (fileNamejpg01).

I'm using the send mail option in a script (which is working) and the option to attach a file by giving a file path. That file path looks like this:
file:../../../Desktop/werkmap/Beeldmateriaal/instagram/$fileNamejpg01 

The variable part is "$fileNamejpg01" and I'm sure I'm doing something really dumb ... but don't find anything that solves the problem (or that I at least understand).

Hope someone can help!

Thanks, Peter

The file path window and what you feed it is not a calculation window so you have to calc the path ahead of time and feed it the resulting variable

Set Variable[ $path ; Get(DesktopPath) & "werkmap/Beeldmateriaal/instagram/" & $fileNamejpg01 ]

  • Author
18 hours ago, Wim Decorte said:

The file path window and what you feed it is not a calculation window so you have to calc the path ahead of time and feed it the resulting variable

Set Variable[ $path ; Get(DesktopPath) & "werkmap/Beeldmateriaal/instagram/" & $fileNamejpg01 ]

I'm staring blindly at a screen now after trying again ... I'll give it a rest until tomorrow and I'll let you know if I've gotten it to work Wim!

  • Author

I'm lost ...

I've added two screenshots of what I have now but I can't get it to work. Been trying different options of all I could think of but not getting anywhere. 

Hope you can make sense of it Wim. It's probably something really dumb I've done but it would help a lot if I get to understand it and get it to work!

Thanks!

1.png

2.png

No, that last window is not a calculation dialog.  The only thing you should have there is:

 

$path

The $path variable needs to be set in your script before you get to the Send Mail script step

  • Author

Thanks for you patience Wim!

I got it to work and cleaned up my folder structure a bit to make the whole think a bit more clean and simpel while I was at it. It makes the path-calculation a lot easier.

For future reference if people are looking for a similar solution I've included the screenshots of my results:
1. The window that will send the mail
2. The window that calculates the path to the image file
3. The entire script to get it working!

Thanks!

1.png

2.png

3.png

On 5/11/2020 at 7:08 PM, Wim Decorte said:

The file path window and what you feed it is not a calculation window

True, but it's worth noting that it is possible to enter a path as a mixture of literal text and variables. For example, after setting these variables:

Set Variable[ $workFolder ; Get(DesktopPath) & "werkmap" ]
Set Variable[ $filename ; YourTable::SomeField & ".jpg"

you could enter:

file:$workFolder/Beeldmateriaal/instagram/$filename

as a valid path into the Specify File window.

 

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.